[Html-widget] default action is '/' ??

Carl Franks fireartist at gmail.com
Thu Aug 31 10:57:45 CEST 2006


It was changed to not set a default action, so it looks like that was
accidentally reverted in a later update.
I'm not sure whether to blame myself or someone else at the moment, as
I'm at a public terminal and can't look at the repository.

Carl


On 30/08/06, John Napiorkowski <jjn1056 at yahoo.com> wrote:
> Hmm, look at the source code, now why didn't I think of that.  That's what happens when I try to give up coffee :)
>
> In the docs for 1.08 it says:
>
> $self->action($action)   Get/Set the action associated with the form. The default is no action, which causes browsers to submit to the current URI.
>
> I would argue that a sane default is as the documentation suggestions.  More than 90% of the time that is exactly the behavior I want.
>
> Additionally, the way it's right now I can't see how to even force it to have no action.  I'd send a patch for this but it's a big change, what do people think?
>
> --john
>
>
> ----- Original Message ----
> From: Jason Kohles <email at jasonkohles.com>
> To: John Napiorkowski <jjn1056 at yahoo.com>; html-widget at lists.rawmode.org
> Sent: Wednesday, August 30, 2006 3:16:06 PM
> Subject: Re: [Html-widget] default action is '/' ??
>
> 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
>
>
>
>
> _______________________________________________
> Html-widget mailing list
> Html-widget at lists.rawmode.org
> http://lists.rawmode.org/cgi-bin/mailman/listinfo/html-widget
>



More information about the Html-widget mailing list