in reply to CGI.pm input vs textfield
input is one of CGI.pm's "dumb" tag creation methods. None of the attributes you pass ("type", "name", "value") have any special meaning -- it just generates the HTML blindly. You can even write things like this: it's all the same to the input method:
textfield, on the other hand, is a "smart" tag creation method with special logic. Some attributes you pass in now have special meaning. The kicker is that it inteprets the "value" attribute as merely a default (In fact, you can use "default" as an alias for "value"). So unless you tell it otherwise (with force => 1), it will act as a "sticky" form and take the new value for that field from the query string.input({ foo => "bar", blok => "head" }); # <input foo="bar" blok="head" />
blokhead
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: CGI.pm input vs textfield
by ishnid (Monk) on Jun 24, 2004 at 13:18 UTC | |
by avik (Novice) on Jun 24, 2004 at 19:17 UTC |