Hi,

1.How to add default value to text area from my hash having one field as default=>"somevalue",how i need to add default value to test area from the hash below.

2.How to add delimiter other than spaces to text area. If I enter multiple value to the text area and submit the data using the form ,the text area multiple values are separated by space delimiter ,where this will fail for me if i have the values like

config data config values config data values

where if i use space as delimiter it fails as i getting config and data as separate values.So i need to use any delimiter such as $,in text area, and if user gives muliple entries i will separate using delimiters like $,how to add delimiter to text area.

hash function is my @add=( { name=>"comment", type =>"text", default=>"all", enum=>[" "], entries=>"single" }, { name=>"Submode", type =>"textarea", default=>"all ", enum=>[" "], entries=>"more" } ); [% FOREACH element = add %] [% IF element.type == "text" %] <input type="text" name="[%element.name %]" value="[%element.default +%]" size="58"> [% ELSE %] <textarea rows="4" name="[%element.name %]" > </textarea> [% END %] [% END %]

how to change my code accordingly to include default value in text area and also to use different delimeter other than space like $ or ,. please help me in this regard.

20051112 Janitored by Corion: Changed PRE into P tags


In reply to how to add default value using hash value and delimiter to text area in template toolkit by srins

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.