Limit Number of Checkboxes that Can be Checked
I'm using Ray Camden's "Soundings" and I need to limit the number of answer checkboxes that can be checked in a survey to 5 and I need some help with the code. I've tried some JavaScript solutions with no working results.
<cfoutput>
<p>
<div class="answers">
<cfset type="checkbox">
<cfloop query="answers">
<input type="#type#" name="question#attributes.step#" id="question#attributes.step#_#id#" value="#id#" <cfif listFindNoCase(attributes.answer,id)>checked</cfif>><label for="question#attributes.step#_#id#">#answer#</label><br>
</cfloop>
</div>
</p>
</cfoutput>
Thanks!