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.

Pseudocode

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

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 the Advanced tab and choose Logic.

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

  5. Choose Conditional as the logic type.

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

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

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

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

  10. Click Save.

results matching ""

    No results matching ""