question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Pipedrive webform not working

See original GitHub issue

Describe the bug

Hey guys I’ve got a prob here. So I’m going to include a Pipedrive web form on my landing page. This is the code snippet given by Pipedrive.

However, it’s not rendering most of the time and it shows “canceled” in the console. So I tried to use iframe instead of div, and it renders properly every time. But one prob now is I wanna redirect to another page after the user submits the form. If I use an iframe to render out the webform, it only redirects to a new page in the iframe but not the whole page. I wonder if there’s any way to solve this?

*The code works properly in svelte repl tho. I assume this is a sveltekit issue image

Reproduction

Code snippet given by pipedrive(not rendering)

<div class="pipedriveWebForms" data-pd-webforms="https://webforms.pipedrive.com/f/c54Q8p5Xk9h2TKrTxhDcoEX6zKN0QOHuOAalQUIPiIh1UX31CXcpNgIijy1PAj8gHp"><script src="https://webforms.pipedrive.com/f/loader"></script></div>

code snippet that’s rendering but redirecting only in the iframe <iframe class="pipedriveWebForms" data-pd-webforms="https://webforms.pipedrive.com/f/c54Q8p5Xk9h2TKrTxhDcoEX6zKN0QOHuOAalQUIPiIh1UX31CXcpNgIijy1PAj8gHp"/><script src="https://webforms.pipedrive.com/f/loader"></script>

if I include it in svelte:head it works as well

<svelte:head>
<div class="pipedriveWebForms" data-pd-webforms="https://webforms.pipedrive.com/f/c54Q8p5Xk9h2TKrTxhDcoEX6zKN0QOHuOAalQUIPiIh1UX31CXcpNgIijy1PAj8gHp"><script src="https://webforms.pipedrive.com/f/loader"></script></div></svelte:head>

Logs

No response

System Info

System:
    OS: macOS 12.3.1
    CPU: (8) x64 Intel(R) Core(TM) i5-1038NG7 CPU @ 2.00GHz
    Memory: 296.08 MB / 16.00 GB
    Shell: 5.8 - /bin/zsh
  Binaries:
    Node: 16.10.0 - ~/.nvm/versions/node/v16.10.0/bin/node
    Yarn: 1.22.18 - /usr/local/bin/yarn
    npm: 7.24.0 - ~/.nvm/versions/node/v16.10.0/bin/npm
  Browsers:
    Chrome: 98.0.4758.80
    Safari: 15.4
  npmPackages:
    @sveltejs/adapter-auto: next => 1.0.0-next.50 
    @sveltejs/kit: next => 1.0.0-next.347 
    svelte: ^3.44.0 => 3.48.0

Severity

annoyance

Additional Information

No response

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:1
  • Comments:9 (9 by maintainers)

github_iconTop GitHub Comments

2reactions
Rich-Harriscommented, Jul 20, 2022

Yeah, delaying the script loading works. Feels suuuper janky though — massive layout shift because the form isn’t server-rendered, and it will only work for the first page load. If you have any say in the matter I would recommend avoiding this method of adding forms to your site.

Though I assume they have an SDK that lets you programmatically add forms to elements that are created after the script has loaded, which should help in the client-side navigation case.

Unclear why it’s sensitive to hydration timing, but it feels very much like a Pipedrive issue rather than a SvelteKit issue so I’ll close this.

2reactions
Rich-Harriscommented, Jul 19, 2022

@kamerat then maybe you can provide a repro, in the absence of one from @tant2012?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Web Forms - Knowledge Base | Pipedrive
Pipedrive Web Forms allow you to create your own personalized, embeddable forms for your website to collect your website visitors' information and funnel ......
Read more >
Web Forms | Sales Lead Capture Forms - Pipedrive
Pipedrive's Web Forms features · Fully customizable · Multiple ways to share · Capture and store leads · Seamless CRM integration · Secure...
Read more >
Embedded web form disappeared - App Development
the pipedrive embedded web form on our wordpress.org site disappeared late October. Seems like the browser is blocking the JS, giving a CORB ......
Read more >
Web Forms - Pipedrive
Our Web Forms feature allows you to set where submissions appear (either as leads in your Leads Inbox or a deal in your...
Read more >
Web Forms: performance and status - Knowledge Base
Note: This page is only available to admin users with the Web forms paid add-on.After you share or embed your Web Form, you...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found