How does one pre-populate fields in an embedded form in wordpress.

  • markashton
    Asked on February 11, 2016 at 10:10 AM

    Hi

    This form: https://form.jotformeu.com/60396538056361

    One field: {name}

    Pre-population of the field via url with a value is easy: https://form.jotformeu.com/60396538056361?name=Dave

    So, let's use embed code in a wordpress site (using Divi theme)

    Check this: http://tester.adaptable-demo.com/test/

    Question? How does one pre-populate fields in an embedded form in wordpress?

    Wordpress is php ... note the url cannot be appended to ... to pass a value through. I have tried but, unless I am mistaken, it cannot be done as easily as this. 

    Can you point me in the right direction please ... however please don't point me to another thread that advises on how to embed a form into jotform. I can do that.

    This question specifically asks if it is possible to pre-populate fields in a jotform that is embedded in wordpress ... 

    Many Thanks

    Regards Mark

     

     

  • victor
    Replied on February 11, 2016 at 12:47 PM

    Hello Mark,

    I am assuming that you used the JotForm plugin in Wordpress to embed your form. If this is the case, as you indicated you will not be able to prepopulate the form using the URL.

    If you review the following thread answered by my colleague, Kiran

    http://www.jotform.com/answers/499489-JotForm-Wordpress-Integration-Not-Working

    You can re-embed the form using  using iframe method or use the our Prepopulate app. If you choose the iFrame, you will just need to adjust the src and include the fields to be populated.

    Please let us know if this helps.

  • markashton
    Replied on February 11, 2016 at 1:52 PM

    Hi Victor,

    Thanks for your response. Appreciate it.

    However, you presumed incorrectly. I don't state anywhere in my post that I used a Jotform plugin. One reason is that it is not/ and will not be updated in a timely manner to be compatible with the latest version of Wordpress. It is a security risk. No, I clearly state that I used the embed code.

    Yeah .. i read this: http://www.jotform.com/answers/499489-JotForm-Wordpress-Integration-Not-Working Respectfully, Did you read it? Uberspaceguru states that the plugin is complete garbage. Kiran states it is not possible to pre-populate fields via the embed method. Why? logiforms were doing it 5 years ago. 

    You mention the prepoulate app ... complete garbage in terms of what I require ... you just did a search around like I did ... tell me how will that help me meet my clearly described aim? It won't will it ... so why mention it? Or am I missing something?

    That leads to the last thing with the Iframe ... how does the value pass through the url? It doesn't. No, that didn't work either ... you don't need to be a coder to see why with a little attention-to-detail. 

    Tell you what ... let me rephrase the question ...

    If you were doing a website in Wordpress ... with the permalink structure as in my example ... how would you go about implementing a jotform that could have pre-pop fields?

    This is a form basic really .. and as Wordpress have hundreds of millions of websites it should be doable.

    Hope you can help. 

     

    Regards Mark

     

  • Kevin Support Team Lead
    Replied on February 11, 2016 at 5:48 PM

    The best way to get the URL with all the fields to be prepopulated is using the prepopulate app, as indicated by my colleague above: http://prepopulate.jotform.io/.

    Once you get the URL with the variables prepopulated, you just need to add this URL in the embed method that you are using, so for example, if you are using the iFrame method you just need to update the URL, just replace it with the new URL with the variables.

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotformpro.com/form/40343159945963?regNo=YD60 FRV" frameborder="0" style="width:100%; height:4083px; border:none;" scrolling="no"></iframe>

    The highlighted value, is the value that you want to insert into the field, you need to pass the values over the URL where the form is embedded on.

    It can work with the Javascript embed option and the iFrame as well.