Skip to main content
Solved

Is Prefill on embeded form possible?

  • February 15, 2020
  • 2 replies
  • 59 views

Forum|alt.badge.img+3

Hi!
I currently use an embeded Airtable form on two sites, same form on both sites.
I would like to know from which site a person filled the form. I have tried change the embed url of the embed code to an url that use prefill.

From
<script src="https://static.airtable.com/js/embed/embed_snippet_v1.js"></script><iframe class="airtable-embed airtable-dynamic-height" src="https://airtable.com/embed/ID?backgroundColor=green" frameborder="1" onmousewheel="" width="100%" height="6066" style="background: transparent; border: 1px solid #ccc;"></iframe>

To
<script src="https://static.airtable.com/js/embed/embed_snippet_v1.js"></script><iframe class="airtable-embed airtable-dynamic-height" src="https://airtable.com/embed/ID?prefill_Tips%20-%20GU%20eller%20BiU=GU?backgroundColor=green" frameborder="1" onmousewheel="" width="100%" height="6066" style="background: transparent; border: 1px solid #ccc;"></iframe>

This simply results in the form not loading at all when embedded.

Is there a way to achieve what I’m after AND still have the form embeded?

Best answer by Noamsay

Hi,

Yes, prefill on embedded form is possible.
Looks like your form does not load is due to a mistake in the URL.
Each parameter should be separated by a & not a ?. The format you should be
form_link?prefill_field=value&prefill_field2=value2&backgroundColor=green

So your embed code should be something like (don’t forget to fill the ID placeholder):

<iframe class="airtable-embed airtable-dynamic-height" src="https://airtable.com/embed/ID?prefill_Tips=%20-%20GU%20eller%20BiU=GU&backgroundColor=green" frameborder="1" onmousewheel="" width="100%" height="6066" style="background: transparent; border: 1px solid #ccc;"></iframe>

2 replies

Noamsay
Forum|alt.badge.img+13
  • Participating Frequently
  • Answer
  • February 16, 2020

Hi,

Yes, prefill on embedded form is possible.
Looks like your form does not load is due to a mistake in the URL.
Each parameter should be separated by a & not a ?. The format you should be
form_link?prefill_field=value&prefill_field2=value2&backgroundColor=green

So your embed code should be something like (don’t forget to fill the ID placeholder):

<iframe class="airtable-embed airtable-dynamic-height" src="https://airtable.com/embed/ID?prefill_Tips=%20-%20GU%20eller%20BiU=GU&backgroundColor=green" frameborder="1" onmousewheel="" width="100%" height="6066" style="background: transparent; border: 1px solid #ccc;"></iframe>


Forum|alt.badge.img+3
  • Author
  • Known Participant
  • February 16, 2020

Hi,

Yes, prefill on embedded form is possible.
Looks like your form does not load is due to a mistake in the URL.
Each parameter should be separated by a & not a ?. The format you should be
form_link?prefill_field=value&prefill_field2=value2&backgroundColor=green

So your embed code should be something like (don’t forget to fill the ID placeholder):

<iframe class="airtable-embed airtable-dynamic-height" src="https://airtable.com/embed/ID?prefill_Tips=%20-%20GU%20eller%20BiU=GU&backgroundColor=green" frameborder="1" onmousewheel="" width="100%" height="6066" style="background: transparent; border: 1px solid #ccc;"></iframe>


Hi @Noamsay!
Thank you so much for your help. I checked the link in a new tab before embeding it and it worked, so it never occured to me that that would be the problem. Thank you for your help solving it.