mardi 21 février 2023

Twig: How to format html from checkbox URL parameters to \?var1=X,Y,Z

I have a html form that sends the parameters of a checkbox group (X,Y,Z) to the URL like this:

https://mycompany.com/?var1=X&var1=Y&var1=Z

I want to change the way the form sends the variables so the URL is formatted like this:

https://mycompany.com/?var1=X,Y,Z

I’m happy to use any type of code but prefer twig.

Any thoughts or advice would be greatly appreciated.

Being a newbie at this level, I’ve tried to guess various twig and Java scripts with nothing delivering the ideal outcome above.




Aucun commentaire:

Enregistrer un commentaire