Jump to content

select control to let user edit


inungh

Recommended Posts

I have a select control on the form and woudl like to let user add new record if the value does not exist in the list. I do not find any property for this, users must select from the list.Can you please advise if there is any way to do so?Your information and help is great appreciated,Regards,Iccsi,

Link to comment
Share on other sites

<select>
<option value="volvo">Volvo</option>
<option value="saab">Saab</option>
<option value="mercedes">Mercedes</option>
<option value="audi">Audi</option>
</select>
Thanks for the information and help,
I have above code and have this select control on the form.
It only allows user to enter option value in the list, I would like user to enter a new list like 'BMW', 'Toyota' if it is missing from the list.
Thanks again for helping,
Regards,
Iccsi,
Link to comment
Share on other sites

  • 2 weeks later...

You won't be able to do this with just HTML. If you want people to add to the list on the fly, you will need Javascript. If you need them to be able to save and persist this data after a user has made one, you will need Javascript, PHP, and some sort of storage method, like a file or database. I would recommend you start reviewing the PHP and PHP forms chapters of the w3schools tutorials.

Link to comment
Share on other sites

Maybe you could tolerate something like this...

<select>  <option value="volvo">Volvo</option>  <option value="saab">Saab</option>  <option value="mercedes">Mercedes</option>  <option value="audi">Audi</option>  <option value="other">Other</option></select><br/><label>Other:<input type="text" name="other"/></label>
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...