setting values in select element

From: Date: Mon, 09 Jan 2006 17:06:26 +0000
Subject: setting values in select element
References: 1 2  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-22477@lists.php.net to get a copy of this message
Hi, My form has a select element used to build a SQL query. My problem is: quickform gives number to the values of the options, so I need to make an extra but useless query. It would be much easier in my case if those values were similar to the text's options shown to the user. Like: <select> <option value="thing1">thing1</option> <option value="thing2">thing2</option> ... I've come up with this idea: when the user submit the form, a hidden element is set with the text of the selected option. But i'm not satisfied with this solution because it would be done in javascript.

Attachment: [application/pkcs7-signature] smime.p7s
« previous php.pear.general (#22477) next »