the way I do it is as follows
1. set up the value from the database as the defaults
e.g.
<cfparam name="FORM.dropdownlist1" default="#query.dropdownlist1#">
<cfparam name="FORM.dropdownlist2" default="#query.dropdownlist2#">
<cfparam name="FORM.dropdownlist3" default="#query.dropdownlist3#">

Now that you have the default FORM values.. lets display the form fields:

<select  name="dropdownlist1">
<cfloop query="qry_getdropdownlistallvalues">
<cfset selected = "">
<cfif value EQ FORM.dropdownlist1>
<cfset selected = "selected">
</cfif>

<option value="#value#" #selected#>#name#</option>
</cfloop>
</select>

repeat for each of the drop downs

I hope this helps you on your way

Regards

Mark Drew


On Sat, 14 Aug 2004 02:16:56 -0700, Steve Sawyer
<[EMAIL PROTECTED]> wrote:
> I have six dynamic drop-down lists on an update form.  I would like the
> lists to default to the current value in the database and allow for updates.
> For example, if a user wishes to update lists #2 and #5, the lists would
> default to the current values for those fields and allow for changes.  On
> submission the remaining 4 lists would retain their current values. Can
> anyone please point me to some documentation regarding this?
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to