fnagel/jquery-ui — Issue #173: How to use the "selected" attribute to show a default selected element ?
Author: pixelgamma
Created: 2011-10-12 13:52:27+00:00
State: open

Hello,

First sorry for my poor english.

I have a form in which I've got severals select menus. The user chooses the value for each menu, then saves the form. After that, **when the user edits the form** (so the values of select menus), I want to show in each select menu the values he saved before, as default values.

In my edit form, with a loop in php, I check each value and put a **"selected"** attribute on each ```
theSelectedValue
```.

**BUT**, even if I do that, the default index of each select menu is equal to **ZERO**, so the **"selected"** attribute has no effect.

If it's enough clear to understand my problem, I need your help guys. Thanks a lot ! ;-)