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

    Hidden fields do not seem to hold pre-populated values when looking through source code

    Asked by shaunc869 on August 10, 2015 at 03:06 PM

    Hi, this issue seems to still exist, if I take this form above and pass in the values like this:

     

    http://www.jotformpro.com/form/31955116403954?webdealPrice=185&ryaCourse=Start%20Yachting&courseDate5=2013-06-28&formatduration=Fri-Sun,%20Nights&typehidden7=Start%20Yachting&formathidden30=Fri-Sun,%20%20Nights&datehidden8=2013-06-28&pricehidden9=185

     

    If I view the source the hidden fields don't appear to have any values in the form, what am I missing? Thanks!

    pre-populated fields value pass value URL pre-populating
  • Profile Image

    Answered by Ben on August 10, 2015 at 04:35 PM

    Please do note that fields, will hold the value, but if they get the value after they are being created, they will not show you the value attribute in their source.

    So:

    <input id="input_7" class="form-hidden" type="hidden" name="q7_typehidden7" value="Start Yachting"></input>

    <input id="input_8" class="form-hidden" type="hidden" name="q8_datehidden8" value="2013-06-28"></input>

    <input id="input_30" class="form-hidden" type="hidden" name="q30_formathidden30" value="Fri-Sun, Nights"></input>

    <input id="input_9" class="form-hidden" type="hidden" name="q9_pricehidden9" value="185"></input>

    <input type="hidden" name="event_id" value="1439237786947_31955116403954_LWB68LJ"></input>

    Is possible in some cases, but should not be expected.

    The reason why is that this value, is not shown in the source code that you get by pressing CTRL + U, but might be included in the source code shown to you by some developers tool - as it is dynamically created like that).

    If you wish you can always fire few JS calls to test this on your form, by using any of the tools that you are familiar and running something like:

    document.getElementById('input_7').value; to get the value of typehidden7 which was Start Yachting.