What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

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

    Asked by EsEconomia_USA 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
    JotForm Support

    Answered by Jim_R 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:

    Smart-Forms-Using-Conditional-Logic

    How-to-Show-or-Hide-Fields-Base-on-User-s-Answer

    Hide-or-Show-Multiple-Fields-at-Once