I am creating a form that works as desired, but I wonder whether having the keys starting with a “&” might pose problems at some level (Grav, different browsers/environments…).
The form is redirecting to an url that includes data entered in the form by the visitor through a
Having such field names is so wrong…
I’m not even sure what to suggest here, but one thing I’m certain about - you definitely need to change that logic and change how form is processed on the submit endpoint
You confirm my feeling…
I checked in grav/admin/tools/logs and there is no error on this.
Before redirection, the form is correctly saving the form content in my user/data folder and it contains the field content as shown in the url. So all works as intended on my local Mamp installation.
Is this going to break when in production, wreak havoc in my hosting company’s infrastructure??
Can the key be escaped or encoded to safen the process(es)?
Thank you both for your answers. @pamtbaau I simplified the url, a little too much , for the example. I am actually using an url as given by an external website which is formated as MDN.
I changed to |raw and result is as you explained.
I am keeping the keys as '&sort=distance'.
@Karmalakas The names I am using for the keys are the one I need to add inside the url of the external redirect website. When visitors select the “date” option, this will add &filter=date_lbl%253D90 inside the redirect url. This parameter is decided by the external website and twig operations cannot be done inside the redirect url. Visitors will arrive on the external website with some sorting and filtering of results already done.
I will check if the special characters will still work in production.