http://qs321.pair.com?node_id=508001

srins has asked for the wisdom of the Perl Monks concerning the following question:

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