PDA

View Full Version : pipe feature in forms


twoseven
04-15-2005, 04:22 PM
alright i have a form that gives as an example
value="Item name | Quantity | Unit Price"
now what would be the correct syntax for using it in

<input type=\"hidden\" value=\"here\" />

would it be

<input type=\"hidden\" value=\"item|quant|price\" />

tnguy3n
04-15-2005, 05:44 PM
I don't think you can use pipe in html. However, you can use a condition to check input value. i.e.
if(($_POST[fieldname] == 'item) || ($_POST[fieldname] == 'quant') || ($_POST[fieldname] == 'price'))
{
// do what
}
else

twoseven
04-15-2005, 05:51 PM
in the manual i'm looking at says to use the pipe(|) to separate the 3 values

The " items_list" is sent with each item's name, quantity and unit price separated by the pipe (|) symbol as follows...
value="Item name | Quantity | Unit Price"

directly from the manual
is it possable that on their side they parse out the | so it gets passed as 1 string?

Marco van Herwaarden
04-15-2005, 07:10 PM
Did you already try your first example?

And what are you trying to achieve with this?