<div dir="ltr"><div><div><div><div><div><div>I am trying to find a way to get values back from a dynamic list of checkboxes.<br><br></div>Within my template I have figured out how to create the list of checkboxes based on values from a hash reference. Like so:<br><br>    <% FOREACH ID IN Accomps.keys %><br>            <div>  <br>              <label><input type="checkbox" name="<% Accomps.$<a href="http://ID.NAME">ID.NAME</a> %>" value="<% Accomps.$<a href="http://ID.ID">ID.ID</a> %>"><% Accomps.$<a href="http://ID.NAME">ID.NAME</a> %> <% Accomps.$ID.descrip %></label><br>            </div>  <br>            <% END %><br>            </div><br><br></div>However, I can't figure out how dancer would go about getting back the values from the list of checkboxes as each checkbox input's name is different. I normally get values back in Dancer with:<br><br></div>like this:<br><br> my $input_hash = {  <br>       <br>       Tech => param('tech),  <br>       Type => param('type'),<br>         <br>}<br><br>But I cannot figure out how to do it in this case since the name of the input type is based on the values in the has ref. I have tried to create them based on the values that are fed into the template from the SQL query like this:<br><br>my $input_hash = {  <br>       <br>       Tech => param('tech),  <br>       Type => param('type'),<br>         <br>      while ($sth->fetch) {<br>     <br>       $ANAME => param($ANAME),<br><br>      }<br><br>      }<br><br></div>But this causes plackup start to crash with:<br><br>Error while loading /home/richard/Dancer2/MyApp/bin/app.psgi: syntax error at /home/richard/Dancer2/MyApp/bin/../lib/MyApp.pm line 549, near "while"<br>syntax error at /home/richard/Dancer2/MyApp/bin/../lib/MyApp.pm line 555, near "}"<br><br></div>So I am beginning to think that I am heading down the wrong path.  Any help would be greatly appreciated. <br><br></div>Thanks<br><div><div><div> <br></div></div></div></div>