Hello folks. I'm building a class which uses CGI::FormBuilder for rendering its forms. I have code which parses a text file. I need to present the form preloaded with the content parsed from the text file, ready for further maniuplation.

$defref = { email_subject => "PrsRls: Testing Software", distribute_by => [], release_date => $releasedate, contact => $contact, title => $title, subtitle => $subtitle, body => $body, more_info => $moreinfo, }; print STDERR "About to render page with test release loaded:\n", $title,$subtitle,"\n"; print $form->render(header => 1, sticky => 1, values => $defref ); print STDERR "Should have just rendered form.\n", $releasedate,"\n",$title,"\n", "\$defref is $defref.\n"; print STDERR "In fact, \$defref says the title is: \n$defref->{tit +le}";
following as best as I can the advice at: http://www.formbuilder.org/contrib/author.pl

In the logs I get:

Now running DistroPrsRls::setup() method. Just ran setup() method. The __Load Test Release__ button was chosen. Will now render: /home/hesco/pr-test.txt About to render page with test release loaded: Entire administration Resigns Should have just rendered form. December 31st, 2004 Entire administration Resigns $defref is HASH(0x88636c4). In fact, $defref says the title is: Entire administration Resigns
But for some reason the default values are not appearing in the form. Anyone here familiar with this module and how to make it work?

-- Hugh

UPDATE:

This seems to work and was found in the documentation for CGI::FormBuilder. Perhaps this will be useful to others.

$form->field(name => 'name_of_field', value => $value, force => 1);

In reply to FormBuilder, loading data, stickiness 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.