This is my first time to write a form and I'm using CGI::Formbuilder. I'm needless to say a very poor perl novitiate.

The task involves, among other form elements, the use of a textarea the results of which goes written much later on into a plain text file (PTF) which must remain so, without html tags.

But before that, the form's task is to preview the page to the user through formbuilder's confirm(). However, when this is executed, the text is shown without any paragraph breaks. I have tried making substitutions with the resulting parameters but only the hidden values get modified (by ampersand-coded html tags at that). I need the true html tags temporarily on the preview display page only, not on the actual (hidden) data.

In the template (using HTML::Template), I have tried wrapping the text value in <pre> tags but this doesn't look to good either. (By the way, I'm using one template for both the data entry and preview modes.)

How can I accomplish this in Formbuilder? Anyone's help is much appreciated.


In reply to Paragraph breaks in textarea field only for preview page generated by CGI::Formbuilder by AJRod

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.