Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

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":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-04-19 20:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found