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


  1. johnlaidlaw
    Member

    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 #
  2. yuniar

    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+add


    MachForm Founder

    Posted 11 years ago #
  3. johnlaidlaw
    Member

    Many thanks. Perfect.

    Posted 11 years ago #

RSS feed for this topic

Reply