Embedded forms: Prepopulating Email Address using URL parameter from one form to another isn't working

  • Lewis_administrative
    8 Mayıs 2024 10:50 tarihinde soruldu

    Hi there :)

    We've built two forms for our appointment request process.

    We have an email field on the first form, and would like to prepopulate the email field on the second form with the previously submitted email address using URL parameters.

    The first form's email field unique name is {source_email}

    The second form's email field unique name is {target_email}

    We've set up the page redirect url from the 1st form to the 2nd form as: https://www.otcounseling.com/appointment-2?target_email={source_email}

    The email address from the 1st form is correctly being generated in the url string but is not getting filled into the email address field on the 2nd form.

    Any ideas how to fix this issue? Thanks!

    Jotform Thread 14669321 Screenshot
  • Zayan
    8 Mayıs 2024 11:54 tarihinde yanıtlandı

    Just curious that if this issue persists on the embedded forms? Because when the thank you page has a direct form URL, the value is passed to the field. But when it has URL where the form is embedded, the value doesn't pass. See screenshots.

    Embedded forms: Prepopulating Email Address using URL parameter from one form to another isnt working Image 1 Screenshot 30Embedded forms: Prepopulating Email Address using URL parameter from one form to another isnt working Image 2 Screenshot 41

  • Joeni Jotform Support
    8 Mayıs 2024 13:42 tarihinde yanıtlandı

    Hi Jeri,

    Thanks for reaching out to Jotform Support. I'm sorry that this is happening. I'll need a bit of time to look into this. I'll get back to you as soon as I can.

    Thanks for your patience and understanding.


  • Joeni Jotform Support
    8 Mayıs 2024 14:17 tarihinde yanıtlandı

    Hi Jeri,

    Thanks for patiently waiting. Can you please try to embed your form via iFrame code and use the prefilled URL Parameter to see how it goes? Let me show you how:

    1. In Form Builder, click Publish in the orange navigation bar.
    2. Then, click Embed on the left side of the panel.
    3. Select iFrame and click the Copy Code button.
    4. Now, paste the Code in the HTML section of your website.

    Embedded forms: Prepopulating Email Address using URL parameter from one form to another isnt working Image 1 Screenshot 20

    Give it a try and let us know how it goes.

  • Lewis_administrative
    8 Mayıs 2024 18:35 tarihinde yanıtlandı

    Hi Joeni,

    We used the iFrame embed for both forms on our site, and we're running into the same issue.

    We tested on multiple computers and also in incognito mode.

    Are there any other options if we wanted to keep the redirect form embedded on our site?

    Or will we have to use the form url if we want this functionality?

    Thanks for your help :)

  • Sonnyfer Jotform Support
    8 Mayıs 2024 22:07 tarihinde yanıtlandı

    Hi Jeri,

    I'm very sorry to hear that. It seem the URL parameters does not get passed when the website it came from isn't Jotform. So to troubleshoot, can you try embedding your 2nd form (target form) using the iFrame code below? Notice that it's the same iFrame code, but I added the ?target_email={source_email} to the src part. The idea is for the 2nd form to get the value from the URL parameter, unlike the previous one that the website URL throws the value to the 2nd form.

      <iframe
       id="JotFormIFrame-240713370737859"
       title="Schedule an Appointment - Step 2"
       onload="window.parent.scrollTo(0,0)"
       allowtransparency="true"
       allow="geolocation; microphone; camera; fullscreen"
          src="https://form.jotform.com/240713370737859?target_email=
    {source_email}"
       frameborder="0"
       style="min-width:100%;max-width:100%;height:539px;border:none;"
       scrolling="no"
      >

      </iframe>
        <script src='https://cdn.jotfor.ms/s/umd/latest/for-form-embed-handler.js'></script>
        <script>window.jotformEmbedHandler("iframe[id='JotFormIFrame-240713370737859']", "https://form.jotform.com/")</script>

    Keep us updated and let us know if you need any more help.

  • Lewis_administrative
    10 Mayıs 2024 11:53 tarihinde yanıtlandı

    Hi Sonnyfer,

    This is what we're seeing now after implementing the new iFrame embed code for the second form.

    Any ideas?

    Embedded forms: Prepopulating Email Address using URL parameter from one form to another isnt working Image 1 Screenshot 20

  • Sonnyfer Jotform Support
    10 Mayıs 2024 20:30 tarihinde yanıtlandı

    Hi Jeri,

    I'm very sorry for the confusion. I suggested the wrong parameter on my previous reply. You should use {target_email} in form 2's iframe src instead to catch the email address on your URL.

    Embedded forms: Prepopulating Email Address using URL parameter from one form to another isnt working Image 1 Screenshot 20

    Here's the updated iFrame code:

    <iframe

      id="JotFormIFrame-240713370737859"

      title="Schedule an Appointment - Step 2"

      onload="window.parent.scrollTo(0,0)"

      allowtransparency="true"

      allow="geolocation; microphone; camera; fullscreen"

          src="https://form.jotform.com/240713370737859?target_email=
    {target_email}"

      frameborder="0"

      style="min-width:100%;max-width:100%;height:539px;border:none;"

      scrolling="no"

     >


     </iframe>

        <script src='https://cdn.jotfor.ms/s/umd/latest/for-form-embed-handler.js'></script>

        <script>window.jotformEmbedHandler("iframe[id='JotFormIFrame-240713370737859']", "https://form.jotform.com/")</script>

    Keep us updated and let us know if you need any more help.

  • Lewis_administrative
    14 Mayıs 2024 22:08 tarihinde yanıtlandı

    Hi Sonnyfer,

    We tried this solution and now it's just displaying {target_email} and not populating the email address passed in the URL (see below).

    Embedded forms: Prepopulating Email Address using URL parameter from one form to another isnt working Image 1 Screenshot 20

  • Simon Jotform Support
    15 Mayıs 2024 02:52 tarihinde yanıtlandı

    Hi Jeri,

    Thanks for reaching out to Jotform Support. I understand the issue, but I’ll need a bit of time to work out a solution. I’ll get back to you shortly.

    We appreciate your patience while we work on a solution.

  • Simon Jotform Support
    15 Mayıs 2024 03:15 tarihinde yanıtlandı

    Hi Jeri,

    We really appreciate your patience and understanding while we’re looking into this. I cloned your form and tested, and I was not able to replicate the issue. You can see below that the Prepopulate Fields via URL Parameters feature is working smoothly. It seems like the issue occurred by the configuration of your website, we have Jotform Solution partners who can assist you with that.

    Embedded forms: Prepopulating Email Address using URL parameter from one form to another isnt working Image 1 Screenshot 20

    Let us know if you need any further assistance.

 
Yanıtınız