Jump to content

Archived

This topic is now archived and is closed to further replies.

john_6767

how to display multiple items in list

Recommended Posts

hi,
i have an add page where i fill out text fields and select multiple items from a list box and then add these to a database field. My problem is that i have a seperate edit page where i am trying to display this data again and don't know how to display the list items that were selected highlighted and in the list as well as the options from the add page so the user can update the field..

I'm not sure if i have explained this clearly enough, on the edit page i have all the fields from the add page shown so they can be updated, I have no problem showing in the text areas the values that are in the database but don't know how to do this for the list field, (doing this with checkboxes would also be ok but again i'm not sure how to show which checkboxes are selected using only one db field)
cheers

Share this post


Link to post
Share on other sites
Hello,


[code]
  <select name="select" size="1" multiple>
    <option value="1" selected>1</option>
    <option value="2" selected>2</option>
    <option value="3" selected>3</option>
    <option value="4">4</option>
    <option value="5">5</option>
  </select>
[/code]

hth

Share this post


Link to post
Share on other sites
hi,
thanks for your reply. I don't think i explained it clearly enough, I want to show the items in a list which i can do, and have the items that are in the database field already selected in the list when page loads..

so the results is i end up with a list that has all the items available and some of them (the ones in database) are the only ones selected.

Share this post


Link to post
Share on other sites
[!--quoteo(post=380427:date=Jun 6 2006, 12:15 AM:name=John_6767)--][div class=\'quotetop\']QUOTE(John_6767 @ Jun 6 2006, 12:15 AM) [snapback]380427[/snapback][/div][div class=\'quotemain\'][!--quotec--]
hi,
thanks for your reply. I don't think i explained it clearly enough, I want to show the items in a list which i can do, and have the items that are in the database field already selected in the list when page loads..

so the results is i end up with a list that has all the items available and some of them (the ones in database) are the only ones selected.
[/quote]

Do you mean you want to show the information in the database throw a select form.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.