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

  • Profile Image
    Asked 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:

  • Profile Image
    Answered on April 15, 2011 at 11:57 PM


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

    Thanks for your patience.

  • Profile Image
    Answered on April 16, 2011 at 01:03 AM


    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.

    The above link redirected me to this page:

    Hope this clears things.

  • Profile Image
    Answered 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
    Answered 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 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 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
    Answered on August 15, 2011 at 07:42 AM


    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!