Repeat selection determined by radio input selection
I have a multi-step form which runs across 5 pages. Page 4 has a radio input field with 6 options which are simply numbers 1-6. what ever number is selected, i would like it to determine the amount of repeats the repeat selection on the next page ( page 5 ). I will then want to use a multiple insert behaviour on the repeat selection.
I’ve tried this so far:
I applied a form data binding to use the radio input value on page 4 as the dynamic value in the repeat selection on page 5 as follows:
<?php
$wa_repeatfor = ".((isset($_POST["specify"]))?$_POST["specify"]:"") ."; // Repeat Selection 1
$wa_repeatcount = 0;
while ($wa_repeatfor) {
$wa_repeatfor--;
$wa_repeatcount++;
?>
this causes a 500 error to the page.
Any idea what I’m doing wrong here.
I’ve attached the two pages..
Thanks in advance