My issue here does not seem to be with CGI::FormBuilder, which is appropriately creating those checkboxes as requested. See Data::Dumper output snippet here:
'fieldrefs' => { 'group_action_94' => bless( { 'cleanopts' => 1, 'fieldrefs' => {}, 'options' => [ 'perform_group_action' ], 'value' => 'perform_group_action', 'name' => 'group_action_94', 'selectname' => 1, 'sticky' => 0, 'required' => 0, '_form' => ${$VAR1}, 'type' => 'checkbox', 'label' => '', 'selectnum' => 5, 'validate' => undef }, 'CGI::FormBuilder::Field' ),
My issue is this: How do I invoke in my template a "<tmpl-var field-checkbox>" with a variable fieldname, which changes on each iteration through the loop and have my dynamically generated checkbox embedded in rows of my output?

Do I need to extend HTML::Template to add a new tag to accommodate a variable field name? And if so, can anyone with knowledge of its innards offer guidance about how best to accomplish that? And if not, how would this be done?

FYI: Save the fact that perlmonks does not want to seem to want me to embed a form into this node, this is the result I'm hoping to see:

<form action="dashboard.cgi" id="Group_Actions" method="post" name="Group_Actions">
Call Group: <select id="group" name="group">
<option value="">-select-</option>
<option value="7">test_group_001</option>
<option value="14">test_group_007</option>
<option value="15">test_group_008</option>
</select>
Group Action: <select id="group_action" name="group_action">
<option value="">-select-</option>
<option value="edit_group">Edit Group</option>
<option value="add_to_group">Add to Group</option>
<option value="remove_from_group">Remove from Group</option>
<option value="delete_from_list">Delete from List</option>
</select>
<input id="Group_Actions_submit" name="_submit" type="submit" value="Process Group Action" />
TagFirst NameLast NameEmailPhoneActions
<input type="checkbox" name="group_action_94" value="perform_group_action"> Testy Tester tt@example.com 123-555-1212 some links
<input type="checkbox" name="group_action_95" value="perform_group_action"> Testoria Tester tt2@example.com 321-555-1212 some links
</form>

Please note: that the field name changes for each checkbox in the tag column; and that the number of rows in this table can not be predicted and will change with user input.

-- Hugh Esco

if( $lal && $lol ) { $life++; }

In reply to Re: CGI::FormBuilder, HTML::Template and \@loop_data question; trying again by hesco
in thread CGI::FormBuilder, HTML::Template and \@loop_data question; trying again by hesco

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.