Comparing Two Values

This conditional logic will compare two responses and return the text same if the two strings are equal or different if they're not equal.


IF {{ Response - Textfield1 }} EQUAL TO {{ Response - Textfield2 }}
    Return "same"
    Return "different"

Form Setup

The form will have two Text Field (Textfield1 and Textfield2) questions that will be compared.

  1. Create a page template with two text field questions on it

  2. Once the page template has been created, add the page to the form.

  3. Click Logic.

  4. Click Add Logic.

  5. Give the logic a name e.g. "Compare textfield entries"

  6. Choose Conditional as the logic type.

  7. In the If block, choose Response for the left side of the expression and select Textfield1 from the list

  8. For the right hand side, choose Response and select Textfield2 from the list

  9. Set the Return value to Text and enter "same"

  10. Set the Else Return value to Text and enter "different"

  11. Click Save.

results matching ""

    No results matching ""