My appreciation to Beth, who gave me a clue for moving this forward. Here is the code I finally used to achieve me end:

my @loop_data; my $phone_lines; while (my $phone = $sth->fetchrow_hashref()){ my $name = 'group_action_' . $phone->{'phone_number_id'}; my $this_phone_line = $phone_line; my $links = $self->_get_links_for_phone_list($phone->{'phone_numbe +r_id'}); $this_phone_line =~ s/CHECKBOX/<tmpl_var field-$name>/; $this_phone_line =~ s/FNAME/$phone->{'fname'}/; $this_phone_line =~ s/LNAME/$phone->{'lname'}/; $this_phone_line =~ s/EMAIL/$phone->{'email'}/; $this_phone_line =~ s/PHONE/$phone->{'phone'}/; $this_phone_line =~ s/LINKS/$links/; $phone_lines .= $this_phone_line . "\n"; $form->field( name => $name, label => '', type => 'checkbox', options => [ ' ' ], sticky => 0, ); } open('TEMPLATE_COMPILED','>',$template_compiled); open('TEMPLATE','<',$template); while(<TEMPLATE>){ if(m/PHONE_LINE/){ $_ =~ s/PHONE_LINE/$phone_lines/; } print TEMPLATE_COMPILED $_; } close('TEMPLATE'); close('TEMPLATE_COMPILED');
I essentially built the template as I went; and as I created each of the form elements. Accumulated the elements into a scalar and then used a string substitution to stitch together a complete custom template that accomodated the data.

I don't think I will be creating that new module to extend HTML::Template at this time. But thanks anyway. And thank you Beth for pointing the way.

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

In reply to Re: RFC: CGI::FormBuilder::Template::HTML::LoopedVariables, that is a Never Mind by hesco
in thread RFC: CGI::FormBuilder::Template::HTML::LoopedVariables 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.