Despite upsetting Jeff (for which I apologise) and spending countless hours playing with loops I'm still struggling to resolve this.
For someone with better Smarty knowledge than me I'm sure the solution must be very simple. I'm building a form template in formBuilder by calling each field individually.
Calling text fields works without problem:
Code: Select all
<input class="form-control" type="text" name="{$actionid}{$name->input_id}" id="{$actionid}{$name->input_id}" title="Enter your name" required="required" />
Also works for a date of birth set of dropdowns.
Code: Select all
<label for="{$actionid}{$dob_day->input_id}">Day</label>{$dob_day->input}
<label for="{$actionid}{$dob_month->input_id}">Month</label>{$dob_month->input}
<label for="{$actionid}{$year->input_id}">Year</label>{$year->input}
My problem is radio buttons, I know they are in an array but I can't come up with a foreach statement to pull them out, if I use {$test_radio|@print_r} I get the following:
As you can see from the screen capture it is showing the radio button, i just can't work out how to reference it.
Could someone please tell me how I can display the group of radio buttons, with their values and labels in my template please?
Thank you,
Chris