How to Pass an Input Field to a Text Field?

  • Profile Image
    VolleyballQLD
    Asked on January 04, 2018 at 03:09 AM

    Hi,

    I am setting up a summary text field and I would like to pass just some of the subfields of some of the form fields.

    Such as the postal code from the address field. I can see in the "Field Details" in the properties section that the field is {address} and the Field ID is #input_31_postal.

    Thanks



    This is a re-post of a comment on Pass an Input Field to a Text Field

  • Profile Image
    Ardian_L
    Answered on January 04, 2018 at 05:42 AM

    Unfortunately you can't separate those fields. I have made a workaround which is not that suitable but please check it out.

    Please clone the demo form I have created: https://www.jotform.com/80014889533965

    Basically I have created a hidden field that accepts only numbers from address field. So when he enters the zip code it will be shown in the text field.

    I hope this is helpful to you.


  • Profile Image
    VolleyballQLD
    Answered on January 04, 2018 at 05:11 PM

    Thanks for this but it also includes the house number and any other digits in the address.  Does that mean that the only purpose of the field ids is for CSS?

    Thanks again

  • Profile Image
    John_Benson
    Answered on January 04, 2018 at 07:24 PM

    You can use this guide to see the Field Names of the field: https://www.jotform.com/help/146-How-to-Find-Field-IDs-and-Names. After that, you can pass the data to the Text field using the Field Name.

    As my colleague reply, you cannot separate the address field and put it in the Text field. 

    Here's another workaround, you can try using multiple Short Text Entry field and name it (Address, City, Zipcode, etc) then pass it in the Text field.

    Also, you might be interested to try this in the notification email content, here's a guide: https://www.jotform.com/help/92-How-to-Strip-Headers-from-Postal-Addresses-in-Email-Alerts