Jump to content

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


MDWeezer

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...
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.