[Templates] CGI plugin weirdness

Matthews Simon sam@knowledgepool.com
Thu, 17 Aug 2000 15:11:22 +0100


>  
>  2. Can I set a default for a text field? Default doesn't 
>  seem to work:
>  
>  parse error: search_form.shtml line 2: unexpected token (DEFAULT)
>  [% q.textfield({ Name => "foo" Size => "50" Default => 
>  "Arse" }) %] at ./example.pl line 52.

Try this............

[% q.textfield({ Name => "foo" Size => "50" 'Default' => "Arse" }) %]

or more simply

[% USE q = CGI %]
[% q.textfield( Name = "foo" Size = "50" 'Default' = 'Arse' ) %]

Which works for me with both of your problems


SAM