I'm playing with this now. Here's what I have:

<textarea cols="45" rows="3" name="event"></textarea>

This becomes:

[% USE CGI %] <textarea cols="45" rows="3" name="event">[% CGI.param('event') %] +</textarea>

It performs as advertised, but doesn't escape any of the HTML characters, so typing </textarea> in the textarea will break it. It appears that the HTML plugin can fix this, but I don't have that installed (yet).

I'm going to have to give this some thought. It's a quick and easy way to make some things sticky, but I don't see how it would work with a select group, for example. I'll second your request to have masem expand on this :)

Update: Hmm... I see what masem is doing, but that kind of defeats part of what I need: a simple, easily maintainable template that our designers can go into a work on. Interesting, though.

Cheers,
Ovid

Join the Perlmonks Setiathome Group or just click on the the link and check out our stats.


In reply to (Ovid) Re(3): Sticky HTML Templates by Ovid
in thread Sticky HTML Templates by Ovid

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.