Passing URL parameter in iframe issue

后端 未结 1 1449
广开言路
广开言路 2020-12-22 11:46

ser goes to http://yoursite.com/your-typeform-page?code=1 using a browser, that page needs to add a IFRAME with url as data-url=https://yoursite.typeform.com/to/U5aOQR?code=

相关标签:
1条回答
  • 2020-12-22 12:14

    I think your question is a duplicate of this question.

    You can see a working example I made on Glitch

    You can edit here.

    Steps to reproduce:

    1. Include Typeform Embed SDK in your HTML
    2. Extract parameters from URL

      let params = new URLSearchParams(location.search);

    3. Reconstruct your form URL

      url += "?utm_source=" + params.get('utm_source');
      
    4. Display form in a target div

      window.typeformEmbed.makeWidget(
        embedElement,
        url, 
        {
          hideHeaders: true,
          hideFooter: true,
        }
      );```
      

    Hope it helps :)

    0 讨论(0)
提交回复
热议问题