0

I have a select menu with many text-based options. However when I submit the form, instead of actually returning the textual item in the POST variable is it possible to set it to return the ID of the selected item?

For example I have the following form:

<select name="dev_stage" id="dev_stage">
  <option>Initial Brief</option>
  <option>Initial Concept Design</option>
  <option>Design Development</option>
  <option>HTML Coding</option>
  <option>Server Side Coding</option>
  <option>SEO</option>
  <option>Feedback and Tweaking</option>
  <option>Delivery and Installation</option>
  <option>Invoiced</option>
</select>

If the user selected "Initial Brief" can I set the form to submit the ID '0' instead of "Initial Brief"?

2
Contributors
2
Replies
3
Views
7 Years
Discussion Span
Last Post by ElegantElephant
1

An option value can be passed like this:

<option value = 1>Initial Brief</option>
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.