Jump to content

Archived

This topic is now archived and is closed to further replies.

MDWeezer

Autopopulated form list defaults to last item in list - Fix?

Recommended Posts

Pardon the ColdFusion tags....  I'd prefer to be doing this in PHP but gotta use what the customer has!
[code]
<form>
<select name="racks" size="20" >
<cfoutput query="racks">
<option value="#RACO_OBJECT_ID#">#RACO_RACK_NAME#</option>
</cfoutput>
</select>
</form>
[/code]

That correctly populates a list with 20 or so options but when all is said and done, the very last record is selected which is a little bit annoying and I would prefer for the first option to be selected.

Would appreciate a fix or some insight. Thanks :).

[b]FIXED.[/b]
I simply took off the </option> tags after each option...

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.