Can I fetch data from a database and use it as a condition on my form?

  • Profile Image
    Asked on March 28, 2017 at 12:03 PM

    For example I need to create a form for inscriptions, the user put his/her DNI and if they aren't  listed in the database the form don't let continue.

  • Profile Image
    Answered on March 28, 2017 at 03:21 PM

    I'm afraid that can't be achieved with JotForm. The only workaround I can think of is to use Conditions to conditionally show the entire form only after a user keyed in a correct/matching DNI.

    If your DNI is somewhat manageable (e.g. just a few) then this would be a practical approach. However, if it's quite huge (e.g. thousands of DNI records), then it may become tedious pasting all of them in a condition (separated by commas).

    Here's what I mean:

    What this basically means is that you're checking if ANY of those DNI values match, then the form will be shown. You may use a Section Collapse tool to show the entire form in one go.

    Complete guide: Show-or-Hide-Multiple-Fields-at-Once-Using-the-Form-Collapse-Tool 

    I'll be listing a few more related guides about Conditions that utilize showing/hiding fields.

    Related guides: