Forums
This topic is locked
Update form with PHP server behavior
22 Nov 2004 06:16:02 m renner posted:
Using Dynamic List/Form behavior in MX:Is there a way to allow updating a form field, with the item stored as an index (foreign key) in db (Value), but have text displayed to the user (Label)? When I try this I get an integer showing up in my update field for pre-existing data, yet all the text fields in the list are available. Is there a way to do this in DW MX? The index could confuse a user as it does not look like the data they selected from the list.
Replies
Replied 29 Nov 2004 16:59:31
29 Nov 2004 16:59:31 Simon Martin replied:
How are you populating the list?
Is this form to update a record? If so you need at least 2 recordsets; 1 to get the details for the record you want to update (which you use to populate the form) and then 1 for each drop down menu you have.
Populate the drop downs in the usual manner, so they get their ID's and values from their own recordset; but set their initial value = the value from the main recordset (which is where you've stored an integer that is the foreign key)
Live the life you love
Love the life you live
Simon
[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]
Is this form to update a record? If so you need at least 2 recordsets; 1 to get the details for the record you want to update (which you use to populate the form) and then 1 for each drop down menu you have.
Populate the drop downs in the usual manner, so they get their ID's and values from their own recordset; but set their initial value = the value from the main recordset (which is where you've stored an integer that is the foreign key)
Live the life you love
Love the life you live
Simon
[DWMX 2004]|[SQL]|[ASP/VBScript]|[XP-Pro]
Replied 30 Nov 2004 16:52:34
30 Nov 2004 16:52:34 m renner replied:
Thanks! I'll try it.
mrenner
mrenner