[thelist] CF Radio Buttons Tip
matthew garrett
matthew.garrett at snet.net
Thu Mar 22 11:41:43 CST 2001
<tip type="cf">
Do you have a form with tons of radio buttons? Here's a simple loop to
assign values (in the processing page) to any unselected ones. Good for a
quiz or survey type deal.
<!--- list radio button names in a variable --->
<cfset checker = 'one,two,three,four,five,six,seven,eight,nine,ten'>
<!--- loop through them --->
<cfloop index="next" list="#checker#">
<!--- find unselected ones --->
<cfif NOT isDefined(Insert(next,'FORM.', 5))>
<!--- assign default value --->
<cfset '#next#' = ' '>
</cfif>
</cfloop>
</tip>
Perhaps i'll have a quiz tip to follow.
matt
More information about the thelist
mailing list