Hidden fields

  • Profile Image
    Asked on August 16, 2011 at 11:46 AM

    Hello, we have on a form a selection of three training dates. 

    Once submitted, we would like our trainer to see the training dates and select one then re-submit the form. So another field 'chosen training date' is required underneath the dates.

    Could we have it so the 'chosen training date' is hidden when the first client fills in the form, but when the trainer goes to the edit link to choose the date, it then appears?

    Otherwise would be the best way to do this so the client doens't accidently fill it in?


  • Profile Image
    Answered on August 16, 2011 at 12:38 PM

    Hi Harry

    Thanks for asking. The only way I can think of accomplishing this is to have two (2) forms and pass the entries from the first to the second via URL parameters. No hiding of fields is required. Let's see how this can be done using two example forms:

    1. Create a simple form with three fields: Full Name, E-mail and Comment, and include a heading with a title of some sort (ex: Trainee Form)

    2. Clone the form and give the clone a different title in the heading (ex: Trainer Form)

    3. From the Power Tools menu on the left of the form builder, add a DateTime field labelled Chosen Training Date, make it a required field, disable the Time section (unless you prefer to have that displayed) and remove pre-polulation of the default time (See screenshot)

    4. Click the Preview button, make a note of the URL of the form and close the Preview window

    5. Go back to the Trainee form, go into the notification of the email alert and note the tags for each field

    6. Let's say the tags for the fields were as follows:

    Full Name: {fullName3}
    E-mail: {email4}
    Comment: {comment}

    At the position where you want the link to the second form to be, type the URL of the Trainer form followed by a question mark (?) and the parameters seperated by an ampersand (&). Since the Trainer form started out as a clone of the Trainee form, the tags would be identical. So, assuming the URL of the Trainer form is https://www.jotform.com/form/12345678901, you would type "https://www.jotform.com/form/12345678901?fullName3[first]={fullName3:first}&fullName3[last]={fullName3:last}&email4={email4}&comment={URLENCODE:comment}" (without the quotes).

    You will notice a couple of things about that URL:

    a.) The the tag for the Full Name field has been broken up into {fullName3:first} and {fullName3:last}. If you were to just use {fullName3} the First Name section of that field in the Trainer form would be pre-populated with the first and last name joined together and the Last Name section would be empty.

    b.) The comment tag has "URLENCODE". That solves lots of issues with pre-populated textareas, one of which I wasn't even aware was resolved: Question marks (?) are now pre-populated correctly.

    7. Select the URL typed in Step 6, copy it, click the Insert/edit link button then paste the URL into the Link URL box and click Insert. This will turn the URL into a clickable link in the notification

    8. Click the Reply-To and Recipient Settings button and when the envelope loads, put a comma after your email address followed by the email address of the trainer. (See Send Form Emails to Multiple Recipients in our user guide)

    9. Click "Finish" and save both forms

    That's it. To see how such a system would work, clone the following forms and replace the Recipient E-mail addresses in the Trainee form with yours and the trainer's, and replace the Recipient E-mail address in the Trainer form with your own. Then make a test submission on the Trainee form:

    Trainee Form

    Trainer Form (this is the one that will be pre-populated at it's URL when the link in the notification from the first form is clicked)

    Hopefully you have found this reply to be helpful in achieving your objective. If you need clarification on anything, please let us know. The team will be happy to help as best as we can.

    ~ Wayne

  • Profile Image
    Answered on August 18, 2011 at 05:02 AM

    Wayne, first class support thank you. This is what makes Jotform stand out from the competition!

    This works perfectly. I didn't realise pre-populated forms could be done!

    Thank you again.

  • Profile Image
    Answered on August 18, 2011 at 06:24 AM

    What would be the tag for a telelphone number - area code and phone number? Just putting in {telephone} comes up with an empty field. Thanks

  • Profile Image
    Answered on August 18, 2011 at 10:22 AM

    Hi again

    The Jotform team wishes to express heartfelt thanks for your appreciative comments. We do try our best to meet our clients' needs.

    Now to your query regarding pre-populating the Phone field. As is the case with Full Name and Address fields, our Phone fields are compound in nature, consisting of an area code and (local) phone number and as such, to achieve proper pre-population, the parameter for each input must be filled separately. So, assuming you went through the same process of creating a form and cloning it, as described in my previous reply and the forms each had a Phone field labelled Telephone, the tags to be used might be {telephone:area} and {telephone:phone} for the area code and local number respectively. (I stated "might" because they could actually be {telephone2:area} and {telephone2:phone} or even {telephone5:area} and {telephone5:phone} in some situations. The only way to know for certain is to check either the "Compose Email" section of the notification or the source code of the form at its URL.)

    Clone this form and note how the two pre-population links in its notification are constructed to pre-populate the phone field of another form which, contrary to "Trainer" form in my first reply, was NOT cloned from the first form. This is just to demonstrate that the form to be pre-populated need not be a clone of the first. It's just easier to construct the link when the forms' tags are identical.

    Hopefully you have found this reply to be as informative and helpful as my first. As always, feel free to post other queries about your forms.


    ~ Wayne

    P.S. Be sure to do your homework assignment as set out in the pre-populated form! :)

  • Profile Image
    Answered on August 18, 2011 at 10:47 AM

    Thank you, homework assingment completed so far!

    If a form is embedded in a webpage, can the forms still be prepopulated with a link in an email, or does it have to be the original jotform link?



  • Profile Image
    Answered on August 18, 2011 at 02:55 PM

    It appears, from what my learned colleagues Liyam and Neil have stated here, that it should work but I have never done this myself. I'll give it a try later (hopefully today) and let you know the result.

    ~ Wayne

  • Profile Image
    Answered on August 18, 2011 at 09:16 PM

    Harry, I just ran a test which confirmed that pre-population of embedded forms via links works. I purposely used the short embed code to embed the form because that method sometimes causes problems with other features like forms being submitted without required fields being completed and so on. So, seeing that it worked with this embed method, I think one can safely assume that it should work with the others methods too.

    ~ Wayne

  • Profile Image
    Answered on August 19, 2011 at 06:52 AM

    Thanks Wayne, I'll try that out this afternoon.

    One more question for now (!) - unique id...can this be transferred from one form to another? We are having a custom database written and our jotform results will start to go in there. Instead of duplicate entries (of clients requesting trial software, then another pre-populated form in that email confirming they want the software for example) ?

    Otherwise if this is not possible, is there an alternative or could a database be clever enough to merge the information together?

    Thanks in advance.  

  • Profile Image
    Answered on August 21, 2011 at 04:05 AM


    I'm not sure if I'm understanding your concerns about the unique ID correctly.  Are you looking for a way to transfer all the contents of your form submissions with the unique ID to another form, or are you asking if you can replicate the unique ID to another form? If you don't mind, we would be happy if you can elaborate further what you mean with this. 

    Also, may I ask if you can post a new topic for this one? It's because your unique ID issue is no longer relevant to the thread and this would be confusing to those who are able to view this topic.