This is the code on the web page:
CODE
<p>Scope of Practice (check all that apply):<br>
<input type="checkbox" name="ScopeOfPractice1" Value="ER"> ER
<input type="checkbox" name="ScopeOfPractice2" Value="Inpatient"> Inpatient
<input type="checkbox" name="ScopeOfPractice3" Value="Newborns"> Newborns
<input type="checkbox" name="ScopeOfPractice4" Value="NursingHome"> Nursing Home<br>
<input type="checkbox" name="ScopeOfPractice5" Value="HouseCalls"> House Calls
<input type="checkbox" name="ScopeOfPractice6" Value="OB"> OB
<input type="checkbox" name="ScopeOfPractice7" Value="SurgicalAssisting"> Surgical Assisting
<input type="checkbox" name="ScopeOfPractice8" Value="SurgeryProcedures"> Surgery Procedures</p>
The .cfm file sends an email and also shows the user what they sent. It works if all of the checkboxes are checked. But if one of the above checkboxes is not marked, I get an error. How do I make a <cfif> statement to see if the box is checked?
Here is the code for the email after the <cfmail> tag:
CODE
Scope of Practice: #Form.ScopeOfPractice1#
#Form.ScopeOfPractice2#
#Form.ScopeOfPractice3#
#Form.ScopeOfPractice4#
#Form.ScopeOfPractice5#
#Form.ScopeOfPractice6#
#Form.ScopeOfPractice7#
#Form.ScopeOfPractice8#
#Form.ScopeOfPractice9#
And here is the relevant code for the webpage that the user sees:
CODE
<cfoutput> Thank you! Below is the information you sent:<br><br>
Scope of Practice: #Form.ScopeOfPractice1# #Form.ScopeOfPractice2#
#Form.ScopeOfPractice3#
#Form.ScopeOfPractice4#
#Form.ScopeOfPractice5#
#Form.ScopeOfPractice6#
#Form.ScopeOfPractice7#
#Form.ScopeOfPractice8#
#Form.ScopeOfPractice9#
</cfoutput>