Como pedir permissão de PopUp/ redirecionar ao site original

  • alexjunmusic
    Perguntado em 4 de dezembro de 2023 às 21:55

    Estou usando o método Stripe Checkout.

    Quando finalizo o formulário, eu deveria ser encaminhado para a tela de pagamento, porém o navegador bloqueia o redirecionamento/ popup.

    Então eu tenho que clicar em permitir, reiniciar a página, refazer todo o processo para que eu consiga continuar.

    Quando termino o pagamento, ele redireciona para a tela de agradecimento, porém o site original fica com uma tela branca. (Estou usando embed).


    Tenho duas dúvidas:

    Como faço para o redirecionamento acontecer na mesma aba, ou como faço para pedir a permissão de popup antes de tudo, para evitar que esse problema de bloqueio aconteça?


    Segunda coisa:

    Como faço para quando finalizar o pagamento, a mensagem de agradecimento ser exibida em meu site (aba original) do formulário?

  • Ravi Jotform Support
    Respondido em 5 de dezembro de 2023 às 01:50

    Hi alexjunpereira,

    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. I’m sorry you're having difficulties with this. The redirection issue you mentioned seems to be specific to the browser. Can you please share us the link to your form in which you are facing the issue with? So I can check it out and help you with a solution.

    When I checked your account from the backend, I found multiple forms present it. It would also be great if you could take a screenshot or record a short video of your issue and send it to us. It would help us to understand better what's happening on your end.

    We have a guide here explaining how to add a screenshot in the support forum. You can share the video recording on any public sharing platform like Google Drive or Dropbox, or you can simply use loom to record the video and share the video link with us.

    Once we hear back from you, we'll be able to move forward with a solution.

  • alexjunmusic
    Respondido em 5 de dezembro de 2023 às 14:49

    Olá, o suporte em inglês parece bom pra mim!


    Aqui esta o Link para o formulário (que esta dentro do meu site):


    https://www.alexjunmusic.com/explore/buytest

    (O Stripe Checkout está em modo de teste)


    Ao preencher os campos e clicar em ''Finish'', aparece a mensagem que um pop up foi bloqueado, então tenho que clicar em permitir e refazer o processo para aí sim ele abrir a tela de checkout em UMA NOVA ABA, deixando a página do meu site com uma tela em branco.Como pedir permissão de PopUp/ redirecionar ao site original Image 1 Screenshot 20

    (Esse bloqueio de popup aconteceu em todos os navegadores que testei, incluindo em celulares)

    Mesmo que eu conclua o pagamento, a mensagem de agradecimento é exibida na nova aba que foi aberta, assim, a original do meu site continua branca.

    Não tem alguma forma dessa tela de pagamento ser aberta na mesma aba?

    Ou quando terminar o pagamento, a mensagem ser exibida na aba original?

  • Rahul Jotform Support
    Respondido em 5 de dezembro de 2023 às 22:17

    Hi alexjunpereira,

    Thanks for getting back to us and for sharing the additional information. Unfortunately, we can't control the pop-up blocked functionality on our end, as it's specific to your browser setting. Usually, once you select the allow pop-up, it should work moving forward without blocking.

    However, you can try the Source code embed method to embed the form on your website and see how this goes. Let me show you how to do it:

    1. In Form Builder, in the orange navigation bar at the top of the screen, click on Publish.
    2. Click on Embed from the left panel.
    3. Next, select Source CodeEmbed Form: Embed form without iFrame Image 1 Screenshot 30 Screenshot 10
    4. Now, click on Copy the code or Download Source code.Embed Form: Embed form without iFrame Image 2 Screenshot 41 Screenshot 21
    5. Paste the code into your web page where you would like to display it, usually somewhere in the body of the page.

    We also have a guide explaining Embedding a Form to a Web Page that you can check out.

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

  • alexjunmusic
    Respondido em 6 de dezembro de 2023 às 12:54

    Aparentemente dessa forma as coisas são um pouco melhores, porém ainda com problemas.


    Desta maneira, ele ainda abre o stripe checkout em outra guia.

    Apesar de não haver uma tela branca na primeira página, o botão continua dizendo ''Please Wait'', mesmo depois que a compra é concluída.

    Além disso, a mensagem de agradecimento continua sendo exibida na janela do Stripe, deixando a tela do meu site com o formulário em espera eternamente.


    Outro problema é que desta maneira, os cantos do formulário ficam com uma cor branca.


    Alguma solução?

  • Catherine Jotform Support
    Respondido em 6 de dezembro de 2023 às 15:16

    Hi Alex,

    We're glad to hear the form is working better on your website now. To better understand the issue, could you please share a screencast of the error? You can follow my colleague Ravi's instructions above on how to do that. Additionally, would you allow us to run a test submission directly from your website? So we can have a better idea of what's going on. Once we hear back from you, we'll be able to move forward with a solution.

    As for your other question, I've moved that to a new thread to avoid confusion. You can check that out shortly here.

  • alexjunmusic
    Respondido em 6 de dezembro de 2023 às 15:25

    O problema é o mesmo citado acima, ele abre o checkout em uma nova guia e exibe a mensagem de agradecimento nessa mesma guia, deixando a guia anterior com uma tela branca (se for embed) ou o botão em ''Please Wait...'' eternamente.

    O esperado seria a tela de agradecimento aparecer na página inicial (meu site), assim que o pagamento fosse concluído, ou pelo menos abrir na mesma aba o checkout.

    Você pode fazer o teste por aqui:

    https://www.alexjunmusic.com/explore/buytest

    O formulário está em modo de teste, então você deve conseguir comprar com o cartão ''4242 4242 4242 4242 12/34'' da Stripe.

    Este esta com o Embed em vez de código fonte, porém o resultado de ambos são semelhantes, a diferença é que em Embed, a tela fica branca, e em Código Fonte, o botão fica em ''Please Wait...'' eternamente.

    Como pedir permissão de PopUp/ redirecionar ao site original Image 1 Screenshot 20

  • Sonnyfer Jotform Support
    Respondido em 6 de dezembro de 2023 às 22:14

    Hi Alex,

    I'm sorry you're still having trouble with this. It seems your website's code is conflicting with the form's. To troubleshoot further, can you please re-embedding your form using the iFrame code below? Notice that it's the same iFrame code you can find in your Publish tab, but with the script part removed.

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

      </iframe>

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


  • alexjunmusic
    Respondido em 7 de dezembro de 2023 às 22:11

    Olá!

    Fiz como sugerido mas continua igual, o checkout é aberto em uma nova guia e a parte do formulário no site fica em branco mesmo depois de finalizada a compra.

    Não se essa informação é útil, mas o site é feito pelo google sites.

    https://www.alexjunmusic.com/explore/buytest

    Como pedir permissão de PopUp/ redirecionar ao site original Image 1 Screenshot 20

  • alexjunmusic
    Respondido em 14 de dezembro de 2023 às 14:14

    Alguma ideia de como resolver este problema?

  • Elton Support Team Lead
    Respondido em 15 de dezembro de 2023 às 09:21

    Hi Alex,

    Thanks for getting back to us with a screenshot. That helped me understand what’s happening. When I tested your embedded form as well as its cloned version embedded on my Google site, I was also able to replicate the issue. I'd like to clarify that Stripe Checkout normally redirects the entire page to Stripe's checkout page. It does not load within its iframe. However, because of Google Sites's iframe restrictions, specifically restricting "allow-top-navigation" in the iframe's sandbox attribute, iframe-embedded content will not be able to redirect the page to external links. This is the reason why it blocks the redirect attempt from the form. Here's what Google says about this:

    In the HTML Service iframe sandbox, allow-top-navigation, which allows the content to navigate its top-level browsing context, is restricted and not set as an attribute in the sandbox. Instead, the allow-top-navigation-by-user-activation attribute has been added to the sandbox.

    If you need to redirect your script, add a link or a button for the user to take action on.

    There are 2 workarounds I could think of at this time that hopefully might still help.

    1. You can switch from Stripe Checkout payment to Stripe. Stripe payment will process the payment during submission without redirection needed. Here's how to integrate your form with Stripe.

    2. You can switch with the source code embed as suggested by my colleague. Despite seeing the Please Wait in the submit button, this opens the Stripe Checkout in a new tab without being blocked. Also, upon my test, it will still submit the form after completing the payment on the Stripe checkout page. The downside is that the embedded form keeps showing Please Wait so users will have to go back to the page and reload it if they want to make another submission.

    Let us know if you have any other questions.