Address Field:How can I break up Address Block info?

  • Profile Image
    jacktreed
    Asked on May 01, 2018 at 11:49 AM

    Hello,

    I need to route email notifications by territory. Currently, you can only extract country-specific data from an address block, not a city or zip code. For our territories that are one US state, I can use the Update/Calculate condition to dump the address block info into a hidden field that I can then run another condition on to extract just the state into a second hidden field. Then I can route an email from the second hidden field. But the states that have multiple territories, I would have to do the above workaround but then also run an additional condition to look for zip as well. Because there are thousands of zips, we split them up by the first three digits. The condition can't look for "902" only in a "90210" zip code, it will find 902 in the street address as well. I would write the zip code condition to look for "California, 902" and "California, 903" etc., but when the address block info is dumped into a regular field the zip code gets put in front of the state. Why? We have up to 8 address blocks in one form and I'd like to avoid redoing all the address fields outside of the address block.

    Any ideas on how to break up an address block by address block subfield so a zip code is dumped into a hidden field alone? On the emails I use for example {address101:addr_line1} to remove the address block subtitle of Address. Can I do the same sort of logic in a Condition?

    Thanks,
    JR

  • Profile Image
    Richie_P
    Answered on May 01, 2018 at 01:18 PM

    You can separate the address field by using this setup in your email content.

    {address:addr_line1}

    {address:addr_line2}

    {address:city}

    {address:state}

    {address:postal}

    {address:country}

    If you want to prepopulate the the Field with URL, you need to replace the "address" with the name of your field.

    Do  note that, you can display them in the Thank you page,Email Notification and Autoresponder and through URL to another form page.

    If you need any further assistance, please let us know.

    Thank you.

  • Profile Image
    jacktreed
    Answered on May 01, 2018 at 01:31 PM

    Hello,

    Thanks for your response but that wasn't my question. I am already using {address:addr_line1} and the rest of them in my emails so I don't get the subtitle. I'm trying to split the address block up before that so I can use the part with just the info from one subtitle in another condition.

    Right now I dump the address block info into a hidden field that I can then run another condition on to extract just the state into a second hidden field. Then I can route an email from the second hidden field. I want to do it with the zip code.

    Thanks.


  • Profile Image
    Richie_P
    Answered on May 01, 2018 at 02:36 PM

    Thank you for the clarification. Can you share to us the Form you have created?

    You can use the Text Element to retrieve the Zip code of the address field.

    In your Text Form source code, you add the {address:postal}

    Here is my sample screen cast:

    But if you want to use the zip code for a condition, may I suggest creating a separate field question for Zip so that you can easily manipulate the conditions.

    Hope this information helps.

    If you need any further assistance, please let us know.

  • Profile Image
    jacktreed
    Answered on May 01, 2018 at 03:55 PM

    So I can't do anything with the value (zip code) that is dumped into the Text field?

  • Profile Image
    Richie_P
    Answered on May 01, 2018 at 04:16 PM

    Unfortunately, you cannot add a condition using the Text Field.

    Hope this information helps.

    If you need any further assistance, please let us know.

  • Profile Image
    jacktreed
    Answered on May 01, 2018 at 04:55 PM

    Can another field retrieve information from the text field?

  • Profile Image
    Richie_P
    Answered on May 01, 2018 at 05:19 PM

    Unfortunately, you cannot retrieve the value of a Text field to another field. However, you can get the value of your Zip code to be transfered to another Field if you use the Prepopulate URL method.

    Guide:https://www.jotform.com/help/71-Prepopulating-Fields-to-Your-JotForm-via-URL-Parameters

    Here is my sample form, you can test a submission to check the prepopulate URL.

    Form:https://form.jotform.com/81205564544960


  • Profile Image
    jacktreed
    Answered on May 02, 2018 at 08:53 AM

    But this would only work if I prepopulated the value correct? I need the user to populate the value.

  • Profile Image
    Richie_P
    Answered on May 02, 2018 at 10:42 AM

    Yes, the work around I have given above will only work when the value is prepopulated. Unfortunately, there is no other way to populate a value from the address book.