Or You can even use CFSELECT if you can/are using CFFORM.

-Sandeep S Vohra
-----Original Message-----
From: Adrian Lynch [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, September 20, 2006 11:33 AM
To: CF-Newbie
Subject: RE: Embed data from a query into a pull down drop list

You're putting all the results into one option, try:

<select name="Tests" size="2" multiple="no">
<cfoutput query="qGetTests">
        <option value="">#qGetTests.testName#</option>
</cfoutput>
</select>

You might also want to populate the value attribute with an ID prehaps.

Adrian

-----Original Message-----
From: Gary Strommen [mailto:[EMAIL PROTECTED]
Sent: 20 September 2006 16:20
To: CF-Newbie
Subject: Embed data from a query into a pull down drop list


I want to be able to pull data from the database and insert it into a
drop
down list.  I have a list of tests in the database.  I am creating an
evaluation form and one of the questions is to select the test you took.
I
want to be able to have the query output the results into the pull down
list
but I have been unsuccessful at this point.

With this code, I get the results of every test (currently a total of
five):

<table border="0" width="500" align="left">
        <tr>
                <td><cfoutput query="qGetTests">#qGetTests.testName#<br
/></cfoutput></td>
        </tr>
</table>

I am trying to put it in a drop down list with minimal success:
<select name="Tests" size="2" multiple="no">
<option value=""><cfoutput query="qGetTests">#qGetTests.testName#<br />
</cfoutput></option>
</select>

Of course, this is only creating one option... not sure how to create
multiple options, one for every record in the database.

Any thoughts?

Thanks,
-Garebear




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Newbie/message.cfm/messageid:2064
Subscription: http://www.houseoffusion.com/groups/CF-Newbie/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15

Reply via email to