Prefill a form for several question

Hello,

I want to prefill a form with multiples all the content column of the corresponding database.
I already read the official explanation on this link (https://support.airtable.com/hc/en-us/articles/234982508-Prefilling-a-form) but it doesn’t work.

https://airtable.com/Codeofmyform?prefill_Votre%20nom%20complet=”&ENCODE_URL_COMPONENT({Nom complet})"
=> This first part works. I have the name of the person in the form already filled.

But what I want to do is to prefill several questions in the form. So I do what they say to do => “https://airtable.com/Codeofmyform?prefill_Votre%20nom%20complet=”&ENCODE_URL_COMPONENT({Nom complet})&prefill_Prénom=here I chose the right column I want in my database … but they say there is a mistake with the formula. I don’t understand why because I do exactly as in the explanation.

I have this message :
“Sorry, there was a problem saving this field. Invalid formula. Please check your formula text.”

In your second example, after adding the URL-encoded data from {Nom complet}, you forgot to add another quote before the next prefill section. I believe it should look like this:

"https://airtable.com/Codeofmyform?prefill_Votre%20nom%20complet=" & ENCODE_URL_COMPONENT({Nom complet}) & "&prefill_Prénom=" & {YourNextField} ...

I believe the confusion may be coming from the various & symbols required. In Airtable formula syntax, the & operator concatenates surrounding pieces into a string. However, & is also used in the URL before each prefill section (except the first one).

Does that clear things up?

It works :slight_smile: Thank you very much for your help !

Le mer. 12 févr. 2020 à 05:51, Justin_Barrett via Airtable Community Forum airtable@discoursemail.com a écrit :

Hello,

It works when the field is text, but do you know which “code” to write when the field is “single select” or “multiple select”.
I tried to write the same thing but it doesn’t work.

Thank you,

Le mer. 12 févr. 2020 à 17:57, Alexis Blanvillain alexis.blanvillain@mon-consultant-independant.com a écrit :

The example page you linked above shows exactly how to use it with a single select field. You need to exactly spell the option for that field (probably using the ENCODE_URL_COMPONENT() function). I haven’t tested a multiple select, and don’t have the time to do so right now. Could you share the code you’re trying for the single select option?

Hello Justin,
Thank you for your help, it works by doing the formula :

URLofmyform?prefill_NOM=”&{NOM}&"&prefill_Prénom="&{Prénom}&"&prefill_Mail="&{Mail}&"&prefill_Téléphone="&{Téléphone}&"&prefill_TJM%20minimum="&ENCODE_URL_COMPONENT({TJM minimum})&"&prefill_Années%20d’expériences="&ENCODE_URL_COMPONENT({Années d’expériences})… etc.

Le lun. 17 févr. 2020 à 17:33, Justin_Barrett via Airtable Community Forum airtable@discoursemail.com a écrit :

Glad to hear that you got it working! :+1: