You can do this very easily with the cfselects, but in this case i want all
the options visible at once to the users.  SO i have to use either radio
buttons or checkboxes.  Since one and only one option can be chosen, radio
buttons is the thechnique to use.

In your case, the cfselects is wonderful.    Here's an example, where the
current value is taken from the query "getuser": and the list of coutries is
taken from a query on a "countries" table called "getcountries":

<cfselect name="country" label="What country are you from?" query

<cfselect name="country"
label="What country are you from?"  query="getcountries"
display="countryname" value="countrycode" selected="##" />

On 3/19/06, Will Tomlinson <[EMAIL PROTECTED]> wrote:
>
> Mike,
>
> I'm doing the same thing except I used a select menu to make things easier
> on myself. I have a tblpaymentOptions I can query. Then use that query in
> the select query attribute.
>
> I run my cfif's up above the form and set a variable called
> payoptionchecked or some such name. It'd = yes or no.
>
> Then in the selected attribute of the select menu, I put that variable.
>
> In your case, with an input, could you setup a list of options?
>
> <cfset payOptionList = "Visa, M/C, AMEX">
>
> Then loop over the list, checking the values against your shopper data?
>
> <cfloop list="#payOptionList#" index="thisoption">
>
> <cfoutput>
> <input type="radio" name="PaymentMethod" value="#thisoption#"
> Label="#thisoption#"<cfif thisoption EQ "#order.getpaymentmethod()#">
> checked="true"</cfif>>
> </cfoutput>
>
>
> Did this off the top of my head real quick, so sorry if it doesn't work.
> lol!
>
> Will
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:235725
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to