How to pass data from one form to another when the forms are embedded?

  • mmpromotoradevendas
    Perguntado em 22 de março de 2024 às 10:37

    Olá,

    Como faço para passar dados de um formulário para outro quando ambos os formulários estão incorporados no meu web site?

    Preciso que essa troca de informações ocorra usando a minha url.


  • Shirized Jotform Support
    Respondido em 22 de março de 2024 às 10:50

    Hi mmpromotoradevendas,

    Thanks for reaching out to Jotform Support. Unfortunately, our Portuguese Support agents are busy helping other Jotform users at the moment. I'll try to help you in English using Google Translate, but you can reply in whichever language you feel comfortable using. Or, if you'd rather have support in Portuguese, let us know and we can have them do that. But, keep in mind that you'd have to wait until they're available again.

    Now, let me help you with your question. If you want to pass the data from one form to another when both forms are embedded, you need to make sure that you embed your form using the standard procedure. You can check out this guide Embedding a Form Into a Web Page for more information. Here's how:

    1. In Form Builder, in the orange navigation bar at the top of the page, click on Publish.
    2. In the menu on the left side of the page, click on Embed.
    3. Now, click on the embed option you want to use, and copy the code.
    4. That's it. Embed your link on your webpage and you're done.

    How to pass data from one form to another when the forms are embedded? Image 1 Screenshot 20

    Then, you'll pass the parameters to the URL where the form is embedded instead of the form's URL. Here's an example:

     https://www.mysite.com/form?email [example@mail.com]


    If that’s not exactly what you’re looking for, can you explain a bit more, so I can help you better?

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

  • mmpromotoradevendas
    Respondido em 25 de março de 2024 às 09:20

    Olá, bom dia Shirized Ina Garces,

    Eu tentei fazer conforme sua explicação, mas infelizmente não funcionou. Vou tentar descrever passo a passo o que preciso para que vc possa me ajudar.

    eu incorporei o primeiro formulário neste site: https://mmpromotora.com.br/form e após o usuário preencher o formulário eu quero que ele seja direcionado para o próximo formulário que foi incorporado na página https://mmpromotora.com.br/form1

    preciso que alguns dados informado no primeiro formulário sejam repetidos no segundo formulário. Para isso eu configurei a página de agradecimento com a seguinte url https://mmpromotora.com.br/form1?nomeCompleto20={nomeCompleto}&cpf308={cpf285}&celular23={celular}&email24={email}

    Porém quando vou testar retorna a seguinte página de erro

    How to pass data from one form to another when the forms are embedded? Image 1 Screenshot 20

    O que devo fazer para corrigir este problema?

  • Mafe_M Jotform Support
    Respondido em 25 de março de 2024 às 11:59

    Hi mmpromotoradevendas,

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

    Thank you for your patience and understanding. 



  • Mafe_M Jotform Support
    Respondido em 25 de março de 2024 às 20:43

    Hi mmpromotoradevendas,

    Thank you for patiently waiting. What I suggest is to try embedding the form using its iframe embed code into your page. This for both forms. You will include the URL parameters to be used in prefill under src section in the iframe embed code.

    This is what I am referring to:

     <iframe id="JotFormIFrame-231986795017065" title="Demo Form 4.0 " onload="window.parent.scrollTo(0,0)" allowtransparency="true" allow="geolocation; microphone; camera; fullscreen" src="https://form.jotform.com/231986795017065?email1234=test@example.com" frameborder="0" style="min-width:100%;max-width:100%;height:539px;border:none;" scrolling="no" > </iframe> 


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

  • mmpromotoradevendas
    Respondido em 26 de março de 2024 às 15:28

    Infelizmente não funcionou ou eu não soube como incorporar os iframes no me site.


    Por gentileza vou passar abaixo os iframes de ambos os formulários e a url de cada. Por gentileza informe como devo inserir cada iframe em cada página.


    Formulário 01

    url: https://mmpromotora.com.br/form

    Iframe


    <iframe
    id="JotFormIFrame-240794408974671"
    title="1"
    onload="window.parent.scrollTo(0,0)"
    allowtransparency="true"
    allow="geolocation; microphone; camera; fullscreen"
    src="https://form.jotform.com/240794408974671"
    frameborder="0"
    style="min-width:100%;max-width:100%;height:539px;border:none;"
    scrolling="no"
    >

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



    Formulário 02

    url: https://mmpromotora.com.br/form1

    Ifrme


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

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


    Parâmetros que preciso que sejam copiados do segundo formulário para o primeiro:

    ?nomeCompleto20={nomeCompleto}&cpf308={cpf285}&celular23={celular}&email24={email}


  • Mafe_M Jotform Support
    Respondido em 26 de março de 2024 às 16:11

    Hi mmpromotoradevendas,

    Thank you for getting back to us. What I suggest is to remove the current embed code on the form and re-embed it using the Iframe embed code Here is how to do it:

    • In the Form Builder on the orange navigational bar, click Publish.
    • Click Embed on the left-hand side of the page.
    • Select the Iframe embed option.

    How to Embed DocuSign PDF file on Jotform Image 1 Screenshot 41 Screenshot 10 Screenshot 10 Screenshot 10 Screenshot 10

    • Finally, click on Copy Code to copy your form’s iframe embed code.

    How to Embed DocuSign PDF file on Jotform Image 2 Screenshot 52 Screenshot 21 Screenshot 21 Screenshot 21 Screenshot 21

    To confirm, form 02 will be filled out first since the prepopulating data will come from the second form going to form 01, is that correct? If so, URL parameters should be pasted to the iframe code of form 01.

    <iframe
    id="JotFormIFrame-240794408974671"
    title="1"
    onload="window.parent.scrollTo(0,0)"
    allowtransparency="true"
    allow="geolocation; microphone; camera; fullscreen"
    src="https://form.jotform.com/240794408974671?nomeCompleto20={nomeCompleto}&cpf308={cpf285}&celular23={celular}&email24={email}"
    frameborder="0"
    style="min-width:100%;max-width:100%;height:539px;border:none;"
    scrolling="no">
    </iframe>


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

  • mmpromotoradevendas
    Respondido em 27 de março de 2024 às 10:48

    Olá...ainda não esta atendendo minha necessidade. Segui sua instruções e incorporei o iframe conforme consta abaixo.

    <iframe
          id="JotFormIFrame-240793859424670"
          title="2"
          onload="window.parent.scrollTo(0,0)"
          allowtransparency="true"
          allow="geolocation; microphone; camera; fullscreen"
          src="https://mmpromotora.com.br/form1?nomeCompleto20=
    {nomeCompleto}&cpf308={cpf285}&celular23={celular}&email24={email}"
          frameborder="0"
          style="min-width:100%;max-width:100%;height:539px;border:none;"
          scrolling="no"
        >

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


    quando preencho o primeiro formulário e envio da o seguinte erro.

    How to pass data from one form to another when the forms are embedded? Image 1 Screenshot 20

    O que eu realmente preciso é que o segundo formulário seja aberto com alguns dados do primeiro mas utilizando a url do meu site e não a url da jotform.

  • Joeni Jotform Support
    Respondido em 27 de março de 2024 às 12:58

    Hi mmpromotoradevendas,

    Thanks for getting back to us. I'll need a bit of time to look into this. I'll get back to you as fast as I can.

    Thanks for your patience and understanding.


  • Joeni Jotform Support
    Respondido em 27 de março de 2024 às 13:09

    Hi mmpromotoradevendas,

    Thanks for patiently waiting. I'm sorry if you're still having issues with your form. I understand that you want to pass one form to another when both forms are embedded. You can try prefilling the 2nd form using URL Parameters. You'll change the Thank You page of the 1st form to redirect the user automatically to the 2nd form after the submission. Then, using URL Parameters, the data entered on the first form will be populated on the 2nd form. You can check this guide for more details on how you can automatically pass data from one form to another.

    Give it a try and let us know if you have any other questions.

  • mmpromotoradevendas
    Respondido em 27 de março de 2024 às 13:16

    Olá, Joeni

    Eu já fiz isso e mesmo assim não funciona

    How to pass data from one form to another when the forms are embedded? Image 1 Screenshot 30

    após o envio do primeiro formulário retorna essa tela de erro

    How to pass data from one form to another when the forms are embedded? Image 2 Screenshot 41

  • Mafe_M Jotform Support
    Respondido em 27 de março de 2024 às 13:44

    Hi mmpromotoradevendas,

    Thanks for getting back to us. Can you please disable Redirection to HTTP Post to see if this will make a difference? Let me show you how:

    • In Form Builder, in the orange navigation bar at the top of the page, click on Settings.
    • In the menu that opens on the left side of the page, click on Thank You Page.
    • Now, select Redirect to External Link and toggle OFF the Redirect with HTTP POST option. 

    How to pass data from one form to another when the forms are embedded? Image 1 Screenshot 20

    Reach out again if you have any other questions.

  • mmpromotoradevendas
    Respondido em 27 de março de 2024 às 15:40

    Olá, realmente não esta dando certo.

    O mais próximo que cheguei do resultado esperado foi da seguinte forma:

    E o resultado é esse:

    How to pass data from one form to another when the forms are embedded? Image 1 Screenshot 20


    Abre a página do segundo formulário com a URL contendo todos dos parâmetro, porém os dados não são copiados para o formulário.

  • Mafe_M Jotform Support
    Respondido em 27 de março de 2024 às 16:15

    Hi mmpromotoradevendas,

    Thanks for getting back to us. Can you confirm with us if you are passing form data from form 1 and form 2? Or we are passing data from 2 to form 1? In that case, which form should be filled out first?

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

  • mmpromotoradevendas
    Respondido em 28 de março de 2024 às 09:43

    Olá,

    Eu preciso passar os dados do formulário 01 para o 02. O primeiro formulário que deve ser preenchido é o 01

  • Mafe_M Jotform Support
    Respondido em 28 de março de 2024 às 10:38

    Hi

    Thanks for getting back to us. Please try embedding the second form using default JavaScript code on the web page.

    <script type="text/javascript" src="https://form.jotform.com/jsform/240793859424670"></script>


    It is not required to add any parameters to the embed code. We can send the parameter value to the form directly to the web page, which will be set in the “Thank You” page URL as mentioned below:

    https://mmpromotora.com.br/form1?nomeCompleto20={nomeCompleto}&cpf308={cpf285}&celular23[full]={celular}&email24={email}

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