Gossamer Forum
Home : Products : DBMan : Discussions :

drop-down list values lost when edited?

Quote Reply
drop-down list values lost when edited?
One of my fields is the Location (state) and I have dbman building this by entering the state list in default.cfg. The problem is that if someone enters their state, then edits their record, then saves the edit, the state they entered when their first created the record is lost (presumably because when they edit the drop down list is created from scratch)

Is there an easy way to make the selected option in the drop down list the value they entered when creating the record so the state does not get reset (to nothing) when someone edits their record?

Thanks.

From my default.cfg
(snip)
state => [5, 'alpha', 0, 15, 0, 'Florida', ''],
(end snip)

(snip)
# Select fields. Field name => 'comma seperated list of drop down options'.
%db_select_fields = (
'state' => 'Alabama ,Alaska ,Arizona ,Arkansas ,California
,Colorado ,Connecticut ,Delaware ,Florida ,Georgia ,Hawaii
,Idaho ,illinois ,Indiana ,Iowa ,Kansas ,Kentucky ,Louisian
,Maine ,Maryland ,Massachusetts,Michigan,Minnesota
,Mississippi ,Missouri ,Montana ,Nebraska ,Nevada
,New Hampshire,New Jearsey ,New Mexico ,New York
,North Carolina,North Dakota ,Ohio ,Oklahoma ,Oregon ,Pennsylvania
,Rhode Island ,South Carolina ,Tennessee ,Texas ,Utah ,Vermount ,Virginia
,Washington ,Washington D.C.,West Virginia ,Wisconsin ,Wyoming'
);
(end snip)

Subject Author Views Date
Thread drop-down list values lost when edited? marinedesign 3323 Sep 3, 2001, 3:41 AM
Thread Re: drop-down list values lost when edited?
marinedesign 3237 Sep 3, 2001, 4:01 AM
Post Re: drop-down list values lost when edited?
Stealth 3233 Sep 3, 2001, 6:44 AM
Post Re: drop-down list values lost when edited?
LoisC 3219 Sep 3, 2001, 11:28 PM