Empty hidden fields filled from URL params

  • optimed
    Asked on October 16, 2014 at 3:21 PM

    Hey guyz,

    I have a form on most pages of my websites which autofill hidden fields (Brand, Model etc...) from the URL parameters of the form.

    Once every 4 or 5 times, the 4 hidden fields are empty...?

    Any ideas?

  • David JotForm Support
    Replied on October 16, 2014 at 4:27 PM

    Hi,

    Could you please give us an example of the URL you are using to populate the form?  With that information, we can test the exact setup you are using to pre-populate and see if we are able to reproduce the issue of the hidden fields not being populated.  We also would like to make sure the values are being properly passed.  Let us know and we will be happy to take a closer look.

  • optimed
    Replied on October 16, 2014 at 4:45 PM

    David,

    I am using the code given by JotForm:

    <script type="text/javascript" src="http://form.jotformpro.com/jsform/41465915421958?marque=Titan&grandeur=44X18.00X20&modele=T44&description=44X18.00-20 TITAN T-44"></script>

    I am using parameter to prepopulate the field. It is working on and off...
  • David JotForm Support
    Replied on October 16, 2014 at 5:10 PM

    Thank you very much for that information.  I was able to modify your link to fit my cloned version of your form.  Each submission I made did include the information from the URL:

    http://form.jotformpro.com/42886019259970?marque=Titan&grandeur=44X18.00X20&modele=T44&description=44X18.00-20%20TITAN%20T-44%22

    Produced:

    Empty hidden fields filled from URL params Image 1 Screenshot 20

    I tried several submissions and each time the information was indeed included.  The only thing I can think of the the javascript embed may be having some page conflicts that occasionally cause the URL parameters not to be loaded into the form.

    The only thing I can recommend is trying the iFrame embed method to see if you get more consistent results:

    http://www.jotform.com/help/148-Getting-the-Form-iFrame-Code

    Other than that, I am unsure why the parameters are not being sent every time.  They were with my version of the form, however my version is standalone and not embedded to a page.

     

  • optimed
    Replied on October 16, 2014 at 5:14 PM

    David,

    Just to let you know, I selected randomly 25 pages a few weeks ago and I posted the info... Everything was there on my side.

    I just can't figure out why I get some submission without the info! :S Are you able to check in my submission the one that have these 4 fields blank and check their browser or something?

  • Welvin Support Team Lead
    Replied on October 16, 2014 at 6:09 PM

    I would say the same, I think a conflict between the form script and your website script is causing the problem to the form.

    Re-embedding the form using our iFrame method would fix it. iFrame is recommended when there's a conflict to the page. Please try that and let us know if the issue persists.

    Thank you!