Jump to content


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

  • Please log in to reply
1 reply to this topic

#1 MDWeezer

  • Members
  • PipPip
  • Member
  • 13 posts

Posted 27 September 2006 - 02:07 PM

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

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 :).

I simply took off the </option> tags after each option...

#2 fenway

  • Staff Alumni
  • MySQL Si-Fu / PHP Resident Alien
  • 16,199 posts
  • LocationToronto, ON

Posted 27 September 2006 - 06:55 PM

I won't even ask...
Seriously... if people don't start reading this before posting, I'm going to consider not answering at all.

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users