This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 3
Stripping underscores from url parameter
Started 11 years ago by johnlaidlaw | 3 posts |
-
I am adding some data to a single line text field on a form by passing the data via the url.
e.g. http://www.somewebsite.org.uk/machform/view.php?id=2456&element_72=Some_data_to_add
The data usually has spaces in it so I have replaced these with underscores to ensure that the hyperlink works. But of course the underscores now appear in the data field on the form.
Is there anyway to strip these out automatically when the data is inserted into the element.
Thank you
Posted 11 years ago # -
Instead of doing any modification, I suggest to use the "+" character or "%20" to pass space. It is a valid character and the link should be working fine.
Like this:
http://www.somewebsite.org.uk/machform/view.php?id=2456&element_72=Some+data+to+addMachForm Founder
Posted 11 years ago # -
Many thanks. Perfect.
Posted 11 years ago #
Reply
You must log in to post.