Is it possible to use a conditional to make the contents of one field display the same contents as a separate field?

  • andy492
    Asked on October 15, 2015 at 12:56 PM

    Here's what I'm looking to do, in its simplest form: give my users a checkbox that says "Company A is the same as Company B." If they click that, they won't need to type anything in the Company B field; it will just auto-populate with the company name from the Company A field. If they don't click it, the Company B field will remain open for them to type a separate company name into.

  • David JotForm Support
    Replied on October 15, 2015 at 3:20 PM

    Hi,

    That is indeed possible using conditional logic in your form:

    http://www.jotform.com/help/57-Smart-Forms-Using-Conditional-Logic

    Specifically the update a form field value condition:

    Is it possible to use a conditional to make the contents of one field display the same contents as a separate field? Image 1 Screenshot 30

    Setup your condition to fill in Company B with the data from the Company A field if the the checkbox is checked:

    Is it possible to use a conditional to make the contents of one field display the same contents as a separate field? Image 2 Screenshot 41

    Here is a quick test form to show you how it works:

    https://form.jotform.com/52865606907970

    You can clone the form to your own account to see if the full setup if you would like:

    http://www.jotform.com/help/42-How-to-Clone-an-Existing-Form-from-a-URL

    If you have any trouble getting this setup in your own form, let us know and we will be happy to help.

  • andy492
    Replied on October 15, 2015 at 5:38 PM

    Thank you! This is the route I initially tried, but it wasn't working until I just now made one key change. Where you have  companyA  in the Conditions Wizard calculation window above, it must be clicked once more to change it from numerical (0-9) to alpha (a-z).

    It's not clear from the interface that this needs to be done or how to do it, but without that step the field will not display any letters, so mine was coming up empty.

    Thanks for the help, with the fix it works.

  • David JotForm Support
    Replied on October 15, 2015 at 6:47 PM

    My apologies, I should have made that clear in my post as well.  Glad to hear you were able to get things figured out.  If there is anything else we can assist you with, just let us know.