Validating Checkbox Group
I have added field forms to the contact form solution pack. All is working except:
1. the server validation for the checkbox group will not go away, even when something is checked.
2. the email that is received from the form is not listing the checkboxes. It will only say "Sessions: Array" or "Session: on"
Here is the code I am using in reference to that checkbox group:
$WAFV_Errors .= WAValidateRQ(((isset($_POST["Sessions"]))?$_POST["Sessions"]:"") . "",true,9);
<div id="sessions" class="formInput BoxBorderTop">
<ul class="radioButtons">
<span id="sessions">
<li>
<input type="checkbox" name="Sessions[]" id="All_Sessions" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"" ) ?> />
<label for="All_Aessions">All Sessions</label>
</li>
<p class="day">Wednesday, January 20</p>
<li>
<input type="checkbox" name="Sessions[]" id="Wed_Morning_Sessions" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Wednesday_Morning_Sessions">Morning Sessions</label>
</li>
<li>
<input type="checkbox" name="Sessions[]" id="Wed_Afternoon_Sessions" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Wednesday_Afternoon_Sessions">Afternoon Sessions</label>
</li>
<li>
<input type="checkbox" name="Sessions[]" id="Wed_Luncheon"<?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Wednesday_Lunhceon">Luncheon</label>
</li>
<br class="hide" />
<li>
<input type="checkbox" name="Sessions[]" id="Wed_Dinner" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Wednesday_Dinner">Reception & Dinner</label>
</li>
<br />
<p class="day">Thursday, January 21</p>
<li>
<input type="checkbox" name="Sessions[]" id="Thurs_Morning_Sessions" <?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Thursday_Morning_Sessions">Morning Sessions</label>
</li>
<li>
<input type="checkbox" name="Sessions[]" id="Thurs_Afternoon_Sessions"<?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Thursday_Afternoon_Sessions">Afternoon Sessions</label>
</li>
<li>
<input type="checkbox" name="Sessions[]" id="Thurs_Luncheon"<?php echo((isset($_POST["Sessions"]))?implode(", ", $_POST["Sessions"]):"") ?> />
<label for="Thursday_Luncheon">Luncheon</label>
</li>
<span class="checkboxMinSelectionsMsg">Please choose at least one
session you will be attending.</span></span>
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "9" . ",") !== false || "9" == "")) {
if (!(false)) {
?>
<span id="sessionServerError" class="textfieldServerError">Please choose
at least one session you will be attending.</span>
<?php //WAFV_Conditional contact.php contact(9: )
}
}
}?>
</ul>
</div>
Thank you in advance.