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

  • shaunc869
    Asked on August 10, 2015 at 3: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!

  • Ben
    Replied on August 10, 2015 at 4: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.