Oct 16, 2023 02:56 AM - edited Oct 16, 2023 03:17 AM
Hi everyone,
I searched through the community posts but could not find anything.
Using a formula I created custom URL for every person in our company that will allow prefills in a form.
Solved! Go to Solution.
Oct 16, 2023 08:57 AM
Place every field you're using, so eg {your name} inside the ENCODE_URL_COMPONENT(). Eg: ENCODE_URL_COMPONENT({your name})
That way, it will automatically handle spaces, etc.
Oct 16, 2023 06:06 AM
Oct 16, 2023 06:11 AM - edited Oct 16, 2023 06:15 AM
I can't use the + in the formula. Would not help. The blanks are in the data set
CONCATENATE('https://airtable.com/appxxxx','?prefill_Your Name=',Name)
The result of the formula is a URL with a blank
https://airtable.com/appxxxxxxx?prefill_Dein+Name=John Doe
Oct 16, 2023 06:41 AM
Okay, I see. How about replacing space with +.
CONCATENATE('https://airtable.com/appxxxx','?prefill_Dein+Name=',SUBSTITUTE({Name} , ' ' , '+'))
Oct 16, 2023 06:52 AM
You can use "ENCODE_URL_COMPONENT()"
The ENCODE_URL_COMPONENT formula function translates strings of text and characters into language that can be read in your browser's address field. Because URLs can only read special characters (e.g. %20 instead of a space), you have to encode any normal components in order for them to be used in a web address.
A common Airtable scenario where this is helpful is pre-filling form URLs. This is a tutorial on how to setup a base to automatically generate unique pre-filled form URLs using ENCODE_URL_COMPONENT.
Oct 16, 2023 07:24 AM - edited Oct 16, 2023 07:26 AM
Hi Databaser,
I think that is what I need. Went through the guide but could make not make encode url component work.
Oct 16, 2023 08:57 AM
Place every field you're using, so eg {your name} inside the ENCODE_URL_COMPONENT(). Eg: ENCODE_URL_COMPONENT({your name})
That way, it will automatically handle spaces, etc.
Oct 16, 2023 05:07 PM
I forgot that ENCODE_URL_COMPONENT() exists. Thanks for the follow up.