Jim,

He's right... you need an if statement inside the input tag.  This works with 
HTML form controls too.  If none of the radio set's values return true then the 
first one in that set will be checked.  Also, if you have more than one return 
true then the last one will be selected.  Cause it goes in order.

E.g.
<cfinput 
  type="radio" 
  name="myName" 
  <cfif scope.myName IS 'true'>
    checked="yes"
  </cfif>
>

>I'm designing a form  where I want to have some radio buttons  
>preselected based upon the previous screen.
>I'm looping through and generating a list similar to:
>
><li><cfinput type="radio" name="radio#question_seq#"></li>
>
>(where #question_seq# is generated from a database query).
>
>What I want to do is in that list of radio buttons, ad one which will  
>have the checked="checked" attribute.
>
>I can't figure out how to do this.
>Can anyone point me in the right direction?
>
>My initial try was to attempt a cfif within the cfinput, but that  
>didn't work.
>If any of you are familiar with XSL you can do this with the  
>xsl:attribute tag. That's where I'm coming from.
>
>Thanks
>-Jim

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:15:901
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/15
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:15
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.15
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to