Silverstripe Version:3
Question: I am trying to display selected checkboxes values in an email template but I am getting nowhere. I need some help. For info, the form works and I can display other pieces of data (textfields). Only the checkboxes are giving me trouble.
I have this in my form declaration
new CheckboxSetField(
$name = "DataRequired",
$title = "Data Required",
$source = array("1" => "alpha",
"2" => "beta",
"3" => "gamma",
), $value = "" ),
I tried to display the values in my e,ail template using the following
<tr>
<th>Deadline for request</th>
<td>$DataRequired</td>
</tr>
and
<tr>
<th>Deadline for request</th>
<td><% loop $DataRequired%>$Me<% end_loop %></td>
</tr>
I know the data is submitted because I can see it in the using debug
dataRequired =
1 =
alpha
2 =
beta
3 =
gamma
Any help would be very appreciated