When submitting forms on a wordpress page with multiple checkboxes, on the first submit, when I print_r($_POST), the checkbox array shows two items without their values. Occasionally it works.
Here's the code:
<form action="<?php echo htmlentities($_SERVER['REQUEST_URI']); ?>" id="assessment-form" method="post">
<ul>
<li>
<input type="checkbox" name="Answer[]" value="Checkbox value" />
</p>
<p class="question"><label>Checkbox value</label>
<input type="checkbox" name="Answer[]" value="Checkbox value" />
</p>
<p class="question"><label>Checkbox value</label>
<input type="checkbox" name="Answer[]" value="Checkbox value" />
</p>
<input type="submit" name="submit" value="submit" />
</li>
</form>
Any help would be appreciated!
Edit: I'm referring to just the checked checkboxes