[Html-widget] default action is '/' ??
Jason Kohles
email at jasonkohles.com
Wed Aug 30 21:16:06 CEST 2006
On 8/30/06, John Napiorkowski <jjn1056 at yahoo.com> wrote:
> Hi,
>
> The documentation specifies that the default action to a from is nothing to make it easier to create self referring forms. However everything I do causes an action to be set to "/" in my generated forms. Is this just a documentation error and if so what are people doing to make self referring forms? I'm going crazy trying to deal with this :)
>
I don't see where in the documentation that says this, but the code
contains (in HTML::Widget::process):
# Some sane defaults
if ( $self->container eq 'form' ) {
$self->attributes->{action} ||= '/';
$self->attributes->{method} ||= 'post';
}
Which would seem to imply that you won't get that behaviour if your
elements are in a fieldset. Although personally I would argue with
whoever wrote that code that setting / as the default action hardly
qualifies as sane. :)
--
Jason Kohles
email at jasonkohles.com - http://www.jasonkohles.com/
"A witty saying proves nothing." -- Voltaire
More information about the Html-widget
mailing list