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

    How do I get a value passed to a hidden field?

    Asked by parawing742 on April 15, 2011 at 11:20 PM

    I created a form with a hidden field called jobId whose value is generated by PHP on the previous page of the website. I've tried to pass it to the form using the instructions provided, but when I look at the source code the value field is still blank. How do I make this work? Example url below:

    Page URL:
    http://www.jotform.com/form/10990204313?jobId=1234

  • Profile Image
    JotForm Support

    Answered by liyam on April 15, 2011 at 11:57 PM

    Hello,

    I will submit a ticket to our development team and look into this.

    Thanks for your patience.

  • Profile Image
    JotForm Support

    Answered by NeilVicente on April 16, 2011 at 01:03 AM

    Hi,

    Query strings appended to the url such as "jobId=1234" do not affect the page's source code at all. The fields get prepopulated but that doesn't mean anything until the user clicks the Submit button.

    To find proof that the hidden field prepopulation works in your form, I cloned your form, enabled HTTP POST sending and then changed the Thank You URL to a custom php script that prints out the field values that were filled out.

    https://www.jotform.com/form/11054002242?jobId=1234

    The above link redirected me to this page:

    Hope this clears things.

  • Profile Image

    Answered by parawing742 on April 16, 2011 at 04:04 AM

    Thanks for the quick response. I have no idea how it works, but it does that's good enough for me! Next time I'll test it myself instead of just looking at the source code...

  • Profile Image
    JotForm Support

    Answered by NeilVicente on April 16, 2011 at 04:34 AM

    Yes, prepopulated hidden fields do work. You can test this yourself by doing a test submission in your form. Check the notification email it sends you and look for the field jobid1. It should reflect the value that you have used in the URL query strings.

    Anyway, we are glad to be able to assist you with your concern. Please do not hesitate to ask any questions regarding your Jotform forms. Thank you.

  • Profile Image

    Answered by mendycgi on August 14, 2011 at 11:54 PM

    Am I able to use 'rules' with the hidden field? Using example above.. can I make a rule that if the jobid1=1234 then don't show xyz question? (The 1234 would be prepopulated in the link)

  • Profile Image

    Answered by brx250 on August 15, 2011 at 04:45 AM

    Hi mendycgi,

    Thank you for using JotForm.

    I've tried replicating what you've said on our end and unfortunately, it doesn't seem to work. It's merely because conditional logic are based on user's input during filling up the form. It excludes pre-populating processes. However, let's see if our team can provide any workaround for this matter.

    If you have any other issues and concerns, please feel free to contact us.

    ____________________________________________    

     Albert  |  JotForm Support 

  • Profile Image
    JotForm Support

    Answered by NeilVicente on August 15, 2011 at 07:42 AM

    @mendycgi

    Pre-populating a hidden box (field) cannot trigger conditions. What I suggest is to use a text box instead of a hidden box, then hide that text box by injecting some css codes. Insert page breaks to separate "xyz question " from the rest of the questions then use conditions to skip the page that contains "xyz" when the value of the hidden text box job1 is equal to 1234.

    For more in-depth information, please visit this similar thread where I discussed the issue and provided an example.

    We would appreciate it if you post your follow-up questions on that thread since the original topic on this thread is a little unrelated to your issue. Thanks!


    Neil