title: HTML form error in ColdFusion: "Element __ is undefined in FORM."
body: <p>I'm trying to submit an html form which includes check boxes for the days of the week. When they are checked, I pass a value of 1 for that check box. To handle unchecked boxes, I pass a value of 0 in a CFPARAM tag in the form action page.</p>
  
  <p>I take these form inputs and add them to a structure which I pass to a webservice.<br>
  <br><br>
  Form code (opentroubleticket.cfm):</p>
  
  <pre><code>&lt;form action = "opentroubleticketaction.cfm" method="post" id="myForm" name="myForm"&gt;
      &lt;cfoutput&gt;&lt;input type="checkbox" name="Loc_Mon" value="1"&gt; MON &lt;/cfoutput&gt;
      &lt;cfoutput&gt;&lt;input type="checkbox" name="Loc_Tue" value="1"&gt; TUE&lt;/cfoutput&gt;
      &lt;cfoutput&gt;&lt;input type="checkbox" name="Loc_Wed" value="1"&gt; WED &lt;/cfoutput&gt;
      &lt;cfoutput&gt;&lt;input type="checkbox" name="Loc_Thu" value="1"&gt; THU &lt;/cfoutput&gt;
      &lt;cfoutput&gt;&lt;input type="checkbox" name="Loc_Fri" value="1" &gt; FRI&lt;/cfoutput&gt;
      &lt;cfoutput&gt;&lt;input type="checkbox" name="Loc_Sat" value="1" &gt; SAT&lt;/cfoutput&gt;
      &lt;cfoutput&gt;&lt;input type="checkbox" name="Loc_Sun" value="1" &gt; SUN&lt;/cfoutput&gt; 
      &lt;input type="submit" name="submit" value="SUBMIT" class="beef"&gt;
  &lt;/form&gt; 
  </code></pre>
  
  <p><br>
  Action code (opentroubleticketaction.cfm):</p>
  
  <pre><code>&lt;cfparam name="Loc_Mon" default="0"&gt;
  &lt;cfparam name="Loc_Tues" default="0"&gt;
  &lt;cfparam name="Loc_Wed" default="0"&gt;
  &lt;cfparam name="Loc_Thu" default="0"&gt;
  &lt;cfparam name="Loc_Fri" default="0"&gt;
  &lt;cfparam name="Loc_Sat" default="0"&gt;
  &lt;cfparam name="Loc_Sun" default="0"&gt;
  
  &lt;!---some other stuff---&gt;
  
  &lt;cfscript&gt;
      BodyRT = structNew();
      BodyRT.RepairRequest = structNew();
      BodyRT.RepairRequest['Loc_Mon']=form.Loc_Mon;
      BodyRT.RepairRequest['Loc_Tue']=form.Loc_Tue;
      BodyRT.RepairRequest['Loc_Wed']=form.Loc_Wed;
      BodyRT.RepairRequest['Loc_Thu']=form.Loc_Thu;
      BodyRT.RepairRequest['Loc_Fri']=form.Loc_Fri;
      BodyRT.RepairRequest['Loc_Sat']=form.Loc_Sat;
      BodyRT.RepairRequest['Loc_Sun']=form.Loc_Sun;
  &lt;/cfscript&gt;
  
  &lt;!---some other stuff---&gt;
  </code></pre>
  
  <p>When I submit the form with all checked boxes, it goes through and passes to the webservice correctly with value=1 for each input. When I submit the form with unchecked boxes, I get this error: <br>
  <code>Element LOC_MON is undefined in FORM</code> <br>
  Why is the element undefined, even if I set a default value with the <code>CFPARAM</code> tag?</p>
  
  <p>If I check the MON box, it says <code>Element LOC_TUE is undefined in FORM</code>, and so on.</p>