I am trying to pass a full name from 1 page to another.
But when I type 'Tyler, Brown' inside my text field and redirect to the next page.
The value that is left becomes 'Tyler'
What does apex not allow commas inside value of page item?
is there a way to go around this?
Commas are used to separate multiple item values in an Apex URL, e.g.
http://host/ords/f?p=100:1:1234567890::::P1_ITEM1,P1_ITEM2:value1,value2
Typically you shouldn't be passing user-entered data via the URL - e.g. save the value in a table and pass a system-generated ID for the record instead.
If you must pass a value like this via the URL, you can surround it with backslashes (\
), e.g.
http://host/ords/f?p=100:1:1234567890::::P1_ITEM1,P1_ITEM2:\value1,with,commas\,value2
Source: https://stewstools.wordpress.com/2008/02/05/apex-column-linking-with-data-that-includes-commas/ (note: the links in this old article are dead, but I've tested the method myself on Apex 5 and it works)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With