Skip to main content
Best answer

How can i use query query params for an iframe embed, in Interfaces?

  • March 10, 2024
  • 3 replies
  • 1369 views

Forum|alt.badge.img

I am new to Interfaces and i am trying to fill form fields in advance for an iframe - but it does not seam to work similarly to the script embed. I was following instructions from this article: 

https://help.zapier.com/hc/en-us/articles/18227509518861-Fill-form-fields-in-advance-in-Zapier-Interfaces#h_01HA4TJK3BAHDKVJPR45WSTDPA

 

I tried using the logic from the code snippet type, and apply it to the iframe, by manually adding query-params='' to the embed code, but it does not seam to work. 

 

Here is my sample page: 

https://new-interface-378cad.zapier.app/page

Here is my sample iframe embed:

<iframe src="https://interfaces.zapier.com/embed/page/cltkgtnpi0014132siszlbjs6?&allowQueryParams=true" query-params='field-25d1=test@test.com'; style='max-width: 900px; width: 100%; height: 500px;'></iframe>
 

Further question, in case there is a solution to have query-params working inside an iframe:

If i have a dropdown selection field, which takes pulls in options dynamically from a table, how do i need to specify the pre-appended value in the query param? Would it work if i write it exactly as in the table (e.g. “Spot A1”)? Or alternatively get for reference id from inside the table?

Best answer by Emi.Lian

Further tested and figured it out, it should be added directly to the src url as follows:

  • &<field reference>=<value to prepopulate>
  • and replicate the same if multiple
  • &<second field reference>=<value to prepopulate>
  • &<third field reference>=<value to prepopulate>


Based on the example from my initial post:

<iframe src="https://interfaces.zapier.com/embed/page/cltkgtnpi0014132siszlbjs6?&allowQueryParams=true&field-25d1=test@test.com" style='max-width: 900px; width: 100%; height: 500px;'></iframe>

This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

3 replies

Forum|alt.badge.img
  • Author
  • Beginner
  • Answer
  • March 10, 2024

Further tested and figured it out, it should be added directly to the src url as follows:

  • &<field reference>=<value to prepopulate>
  • and replicate the same if multiple
  • &<second field reference>=<value to prepopulate>
  • &<third field reference>=<value to prepopulate>


Based on the example from my initial post:

<iframe src="https://interfaces.zapier.com/embed/page/cltkgtnpi0014132siszlbjs6?&allowQueryParams=true&field-25d1=test@test.com" style='max-width: 900px; width: 100%; height: 500px;'></iframe>


Forum|alt.badge.img
  • Author
  • Beginner
  • March 10, 2024

Would still need help with the “Further question” :

If i have a dropdown selection field, which takes pulls in options dynamically from a table, how do i need to specify the pre-appended value in the query param?


SamB
Community Manager
Forum|alt.badge.img+11
  • Community Manager
  • March 15, 2024

Thanks so much for sharing the solution you found here @Emi.Lian

To prefill a value in a dropdown field it should work in work in exactly the same way e.g. add &fieldname=fieldoption to the URL.

For example if the dropdown field was called “status” and you wanted to select the option “Pending” you’d add “&status=Pending” to the end of the current iframe src URL:
https://interfaces.zapier.com/embed/page/cltkgtnpi0014132siszlbjs6?&allowQueryParams=true&field-25d1=test@test.com&status=Pending

Can you give that a try and confirm whether that selects the correct dropdown field option?