Hi all I am new in coldfusion. can any one help?> Question: cfif is not working inside coldfusion tag. consider this snipet of code <cfinput type="radio" name="gender" <cfif gender eq qgender.gender>selected> when i put only input rather than cfinput it is working. is there any way to resolve this????
i don't think there is any way around it... this would do the trick with a little extra code <cfif gender eq qgender.gender> <cfinput type="radio" name="gender" selected> <cfelse> <cfinput type="radio" name="gender"> </cfif> however i think the cfinput tags also need values
Did you try closing the <cfif> tag: ie: <cfinput type="radio" name="gender" [B][COLOR="Red"]<cfif gender eq qgender.gender>selected</cfif>[/COLOR][/B]> Code (markup): Are you trying to have this radio button "checked" when the form loads? If so you could try this: <cfinput type="radio" name="gender" [B][COLOR="Red"]<cfif gender eq qgender.gender>checked="true"</cfif>[/COLOR][/B]> Code (markup):