Match conditionally two fields?

  • Profile Image
    Asked on April 12, 2016 at 11:58 AM

    Hello Jotform! :)


    Just to know, is it possible to match 2 fields automatically?


    My users should provide their USER ID and jotform autofill a second field with a given ship code. 


    Is it possible? 



    Thank you!

  • Profile Image
    Answered on April 12, 2016 at 01:18 PM

    That should be possible using conditional logic, although I am not sure how your form really works. Here's a guide to learn more about conditional logic: 

    Perhaps you could gives us a more concern or specific example, that would help us you further.

    Here's an example on how I visualize it: 

    1. In my form, when you type "user1234" in the "User ID" text box, it will insert the code "SHIP1234" in my "Ship Code" text box.


    2. This is how I set it up. First, click the "Conditions" button and choose "Update/Calculate Field". 


    3. Here's how I setup my condition:

    IF "User ID" is equal to "user1234" THEN insert text "SHIP1234" to "Ship Code" text box.


    I hope this gives you an idea on how to proceed on your form.

  • Profile Image
    Answered on April 13, 2016 at 10:42 AM

    Ok Charlie, thank you! 

    This is exactly how it should work.


    But are there any way to do this for 2000 customers without manually match all Users and ships code? (a CSV for example with 2 columns already matched)


    Thank you! :)

  • Profile Image
    Answered on April 13, 2016 at 12:11 PM

    Unfortunately, if you have 2,000 customers with 2,000 keys to match, then it might be too much for the browser to handle if you'll use the conditional logic for it.

    With this design, the only way I can think of is using the form's full source code. Here's how:

    1. First, I'll import the data of the 2,000 customers in a database, like MySQL.

    2. After that, use the form's full source code

    3. Create a custom script that will match the input in the text box and match it to your list in the database.


    You might need to ask a developer for this and embed the full source code on a web page. 

    I hope that helps.