Conditionally send emails based on zip code value on the Address Field

  • Profile Image
    Asked on September 19, 2017 at 05:34 PM

    I understand the conditional logic for changing an email recipient based on a users answer. But the address block is like one field. So my options for the "state" are either filled or not filled. How can I run conditional logic on the the zip code specifically?

  • Profile Image
    Answered on September 19, 2017 at 06:05 PM

    You're right - The STATE options for the Address Field are limited to the following:

    Since your aim is to check the value they entered in the Zip Code field specifically, I'm thinking the Form Calculation Widget will fit your needs. The idea is to pass the value of the entire Address Field to the Form Calculation Widget, then use the "Contains" STATE to check whether the Address Field has a particular ZIP Code value.

    Here's a test form showing this idea. 

    The condition here is to simply show a Text Field if it's true. The same idea should apply if you need to send an email based on the Zip Code value.

    IF Address Field CONTAINS 90210 THEN SHOW the Text Field

    To pass the Address Field to the widget, add a Form Calculation Widget to your form > click the ADD FIELDS button > select your Address Field > then ensure the field has a brown background (indicates text/string).

    Related guide: How-to-Manipulate-Text-String-with-Conditions-and-Calculation