How can I embed a second form with linked values to a Squarespace page?

  • wsale
    Asked on November 27, 2014 at 9:43 PM

    I currently have two forms, with the second form pulling values calculated from the first. I embedded the first Squarespace form in my Squarespace page, and it works great. When I click the submit button, I am taken to the second form, which correctly displays the calculated values. 

    My problem is that the second form is located on the Jotform website, and loses the format and "feel" of my squarespace website. Is there a way that I can pass values between linked forms that are both embedded in a squarespace page? I'd like a user to stay on my website, rather than being taken to Jotform. 

    I used the following instructions to pass the values from the first form to the second:

    http://www.jotform.com/answers/417250-Link-Forms-Pass-value-from-one-form-to-another

     

    I'm not sure if I can change the submission URL to another squarespace page without losing the prepopulated values.

    Thanks!

  • Ashwin JotForm Support
    Replied on November 28, 2014 at 7:50 AM

    Hello wsale,

    Unfortunately it is not possible to pre-populate fields of a form which is embedded using iFrame embed code as squareSpace requires forms to be embedded in iFrame.

    Please be noted that you can use URL parameter directly on the embedded form URL. Something as displayed in following example: 

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotformpro.com/form/43313568627964?name=Ashwin&question=test" frameborder="0" style="width:100%; height:350px; border:none;" scrolling="no"></iframe>

    Hope this helps.

    Do get back to us if you have any questions.

    Thank you!

  • activepresence
    Replied on October 17, 2016 at 6:27 AM

    Hi there,

    I understand the first paragraph of the answer (Squarespace's use of iFrame).

    The second para, "Please be noted that you can use URL parameter directly on the embedded form URL..." does not make any sense to me. Can you please explain another way - what are you trying to say?

    Thanks.

     

  • Chriistian Jotform Support
    Replied on October 17, 2016 at 9:09 AM

    Hi,

    For the second paragraph, my colleague gave you an example iFrame code with src with URL parameters.

    <iframe id="JotFormIFrame" onDISABLEDload="window.parent.scrollTo(0,0)" allowtransparency="true" src="//form.jotformpro.com/form/43313568627964?name=Ashwin&question=test" frameborder="0" style="width:100%; height:350px; border:none;" scrolling="no"></iframe>

    I think he means that instead of setting the src of the iFrame to the form's normal URL

    //form.jotformpro.com/form/43313568627964

    You can set it to something like

    //form.jotformpro.com/form/43313568627964?name=Ashwin&question=test

     

    with URL parameters name and question.

    That way, if you have fields name and question in your embedded form, you can populate them with values like Ashwin and test, respectively.

    For more details, please see Prepopulating Fields to Your JotForm via URL Parameters.