Hi Bob,
Is far as I did understand what was posted before,I did use the "validate-one-required"
That you have to choose one of the radio selections works well.
The problem is that the form will be sent, even if there has not have been made a choise.
- Code: Select all
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<div class="kampeermiddel">
<label>Kampeermiddel: Caravan<input type="radio" name="kampeermiddel" <?php if($_POST['kampeermiddel'] == 'Caravan') echo 'checked'; ?> value="Caravan" />
<label>Camper<input type="radio" name="kampeermiddel" <?php if($_POST['kampeermiddel'] == 'Camper') echo 'checked'; ?> value="Camper" />
<label>Vouwwagen<input type="radio" name="kampeermiddel" <?php if($_POST['kampeermiddel'] == 'Vouwwagen') echo 'checked'; ?> value="Vouwwagen" />
<label>Tent<input type="radio" name="kampeermiddel" <?php if($_POST['kampeermiddel'] == 'Tent')echo 'checked'; ?> value="Tent" class="validate-one-required" /> </div> </td>
</tr>
</table>
I found that if you (I) use the radio codes as:
- Code: Select all
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<div class="kampeermiddel">
<label>Kampeermiddel: Caravan<input type="radio" name="kampeermiddel" <?php if($_POST['kampeermiddel'] == 'Caravan') echo 'checked'; ?> value="Caravan" />
<label>Camper<input type="radio" name="kampeermiddel" <?php if($_POST['kampeermiddel'] == 'Camper') echo 'checked'; ?> value="Camper" />
<label>Vouwwagen<input type="radio" name="kampeermiddel" <?php if($_POST['kampeermiddel'] == 'Vouwwagen') echo 'checked'; ?> value="Vouwwagen" />
<label>Tent<input type="radio" name="kampeermiddel" <?php if($_POST['kampeermiddel'] == 'Tent')echo 'checked'; ?> value="Tent" class="validate-one-required" /> </div> </td>
</tr>
</table>
the validation does not work at all anymore in most cases.
(Sorry, can't get the code right. It differs from Preview, where it is ok.)