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

    Show number of fields according to number chosen

    Asked by kimg10 on January 16, 2015 at 01:49 PM

    Hoping someone can help to see if this is possible in JotForm.  In my JotForm named "TravelInformation Form" I wanted to see if there is a way to ask a question about "How many additional travelers".  Based on the answers to that question the form would show that number of "Traveler" and "Birthday" fields.

    For example, if the person filling out the form chose 3 from a drown to the question "How many additional travelers are you traveling with in your party" the form would then show fields for Traveler_2, Traveler_3, and Traveler_4. as well as Birthdate_2, Birthdate_3, and Birthdate_4.  This way I can make all of those fields required (which I can't do now because I am not sure how many travelers each party will have).

    Not sure if this will also play a part in the answer but I am using the form within a website via the source_code.

    Page URL:
    http://www.kimgoldstein.com/#!customer-info-form/c237g

    multiple condition show field condition
  • Profile Image

    Answered by Carina on January 16, 2015 at 02:53 PM

    You can see the workaround displayed in this thread:

    http://www.jotform.com/answers/495819

    The demo form display a different number of fields according to the number chosen:

    http://form.jotformpro.com/form/50146443448959?

    You can clone the form.
    Let us know if we can be of more assistance.

  • Profile Image

    Answered by kimg10 on January 16, 2015 at 03:12 PM

    Carina,

    I appreciate your response but not sure (based on what I saw in the other thread you pointed me to) this workaround will work.  The reason this will not work is because the fields are still technically there, just shrunk and not expanded.  So, I would not be able to base the "Required" tag on the fields based o the number chosen in the dropdown.  If I were to make them all required, that would not work either because then if the traveler only had themselves traveling they would not be able to submit the form do to the form looking for all additional traveler fields to be completed.

    If for some reason I misunderstood what you pointed me to, please let me know.  Otherwise I will assume this is just not possible with JotForms.  Thanks!

  • Profile Image
    JotForm Support

    Answered by Kiran on January 16, 2015 at 04:45 PM

    I understand that you want to display multiple fields based on the additional travellers option selected. As I check your JotForm, I see that there are 6 additional travellers that can be chosen. We can show the number of fields as required by placing conditions on the number of addl. travellers dropdown. Also, all the fields for this section can be marked as required since the hidden fields are not taken into consideration as required fields. The JotForm cannot be submitted unless the displayed addl. fields are not filled based on the number chosen.

    I've cloned your JotForm to my account and made some changes. Please check this demo JotForm if that works for you.

    http://form.jotformpro.com/form/50156290417956? 

    Let us know if you have any other questions. We will be happy to help.

    Thanks!

  • Profile Image

    Answered by kimg10 on January 16, 2015 at 05:26 PM

    Thanks!  That seems to work for what I was looking for.  Appreciate your help.

  • Profile Image
    JotForm Support

    Answered by Kiran on January 16, 2015 at 05:57 PM

    Glad that the demo worked for you. It's our pleasure to assist you. You may clone this JotForm to your account and make necessary modifications by following the guide below.

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

    Please do not hesitate to get back to us if you need any further help. 

    Thank you for using JotForm!!

  • Profile Image

    Answered by kimg10 on January 16, 2015 at 10:19 PM

    Thank You!  

    The only other question about this form I had for now is if there is a way to have the address fields output as separate fields (since I will be pushing to a database using an API) even though they are one field in the form.
  • Profile Image
    JotForm Support

    Answered by jonathan on January 17, 2015 at 09:49 AM

    Hi,

    Since the next question is different from the original topic on this thread, I had created a new post for it here http://www.jotform.com/answers/497917

    We will attend to it as soon as we can

    Thank you.