Skip to main content
Solved

Prefill forms with the "&" character

  • January 25, 2024
  • 1 reply
  • 20 views

Forum|alt.badge.img+6

I am using a form with some prefilled fields. It works great as long as the item name doesn't include certain special characters. For instance, if it includes an "&" anything after the "&" won't be prefilled. So "Mop & Broom Holder" prefills as just "Mop". Some of the product names we have are a bit long, so it can be a pain to have to type everything out. I know why this is happening, but I'm wondering if there is a way to include the "&" in a url and have it be part of the prefilled information. 

This is the formula I am using in the button that leads to the form.

Form URL'&'?prefill_Name='&Item&'&prefill_Quantity='&{Received Qty}&'&prefill_Project+Tag='&{Project Tag}&'&prefill_Date+of+Update='&TODAY()

This is the URL that I get from that formula using the "Mop & Broom Holder" and an example
...prefill_Name=Mop+&+Broom+Holder=&prefill_Quantity=4&prefill_Project+Tag=ATN&prefill_Date+of+Update=2024-01-25T00%3A00%3A00.000Z

Best answer by Jeff_Hladek

 🙄

I figured this out like 5 minutes after posting this.

For anyone else running into this issue, the solution is to use ENCODE_URL_COMPONENT() in the formula. 
i.e ...?prefill_Name='& ENCODE_URL_COMPONENT(Item)&'...

This changes the URL to ...?prefill_Name=Mop+%26+Broom+Holder...

1 reply

Forum|alt.badge.img+6
  • Author
  • Inspiring
  • Answer
  • January 25, 2024

 🙄

I figured this out like 5 minutes after posting this.

For anyone else running into this issue, the solution is to use ENCODE_URL_COMPONENT() in the formula. 
i.e ...?prefill_Name='& ENCODE_URL_COMPONENT(Item)&'...

This changes the URL to ...?prefill_Name=Mop+%26+Broom+Holder...