Best answer

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

  • 10 March 2024
  • 3 replies
  • 112 views

Userlevel 1
Badge

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?

icon

Best answer by Emi.Lian 10 March 2024, 21:31

View original

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

Userlevel 1
Badge

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>

Userlevel 1
Badge

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?

Userlevel 7
Badge +11

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?