John, > Thank you very much for getting back to me:) > Your solution worked, and makes the code neater. > Glad that helps. > Can I ask one more question: > I am trying to make the form so if it is not entered, it writes one of 3 > values to the database. > if I don't use <cfparam name="form.Checked" default="Not Entered"> > I get an error saying Checked is undefined, but if i use cfparm it always > writes this value(the default) to the database each time the form is opened. > Is there a way around this? > Rather than having Yes/No/Not Entered as your values in the options just enter your values, so for the sakes of arguements lets say; Not Entered = 1, Yes = 2 and No = 3
<input type="radio" name="Checked" value="2">Yes <input type="radio" name="Checked" value="3">No Your CFPARAM would be : <cfparam name="form.Checked" value="1"> To handle the display you could either put a cfif after <b>Radio Button:</b> that says if Checked is 1, then output "Not Entered" and so on, or you could define an array with your text descriptions in and display the cell from the array using the value in FORM.Checked. eg. <cfscript> CheckedText = ArrayNew(1); CheckedText[1] = 'Not Entered'; CheckedText[2] = 'Yes'; CheckedText[3] = 'No'; </cfscript> Your output would be : <b>Radio Button:</b><cfoutput>#CheckedText[FORM.Checked]#</cfoutput> Hope that makes sense. > Thank you so much for helping me it really means a lot to me:) Pleasure. Glad to be appreciated. ;) Regards Stephen ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Find out how CFTicket can increase your company's customer support efficiency by 100% http://www.houseoffusion.com/banners/view.cfm?bannerid=49 Message: http://www.houseoffusion.com/lists.cfm/link=i:15:1541 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
