Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple selections from CFSELECT

Status
Not open for further replies.

profwannabe

Programmer
Jan 6, 2001
53
US
I am trying to enable multiple selections using the following:

Code:
<cfselect name=&quot;Methodology&quot; query=&quot;getMethodologyCodes&quot; value=&quot;CodeValue&quot; display=&quot;CodeValue&quot; multiple>
<option value=&quot;--none--&quot; selected>--none--</option>
</cfselect>

The Tag Editor does not set multiple to anything, but merely inserts &quot;multiple&quot; into the tag; I have tried multiple=&quot;Yes&quot;.

I don't get any errors in either case, but I have tried a variety of key+click combinations (i.e. ctrl+LeftClick, shift+LeftClick, alt+LeftClick, ctrl+shift+LeftClick...), but the dropbox merely closes after a single selection. I am sure this is an easy one, but I cannot figure it out...
 
I copied your <cfselect> statement, removed the query attribute, added a few hard coded <option>s, and it worked the way I would expect. The select box had 4 entries viewable and shift-left click would select multiple entries. As far as the syntax goes, the word &quot;multiple&quot; without a value specifies that multiple entries are selectable. Adding a &quot;size&quot; attribute will allow you to customize how many entries are viewable as in <select ... multiple size=&quot;3&quot;> would allow multiple entries and 3 would be shown with the others scrollable. You can also add the &quot;size=3&quot; attribute to the <cfselect> tag.

I would recommend though as cfhub does that you stick with regular html selects.

Hope this helps,
GJ
 
just a detail, but this would have been more appropriate to post this question in the html forum - as it's a pure html problem !!
 
Got it working, but am still not sure why...

Thanks again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top