|
Re: ColdFusion - Using listboxes - Need Help!
Hi Dear
instead of using variables.gender use simply datasourcename.gender and as far as concern of cfoutput it is only for display purposes. so in your case you use or not it does not effect on your list box.
so your code will become
<select name="Gender">
<option value="Male" <cfif actor.Gender IS 'Male'>Selected</cfif>>Male</option>
<option value="Female" <cfif actor.Gender IS 'Female'> Selected</cfif>>Female</option>
</select>
but be careful, your recordset should be return only and only one record.
enjoy
|