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

John Napiorkowski jjn1056 at yahoo.com
Wed Aug 30 20:58:26 CEST 2006


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

Here is my form.  I am using Catalyst, if that helps:

sub template_form
    my ($self, $c) = @_;

    # Create an HTML::Widget to build the form
    my $w = $c->widget('template')->method('post');
    #set an action
    # Create the form fields
    $w->element('Textfield', 'title')->label('Title')->size(24);
    $w->element('Textarea', 'description')->label('Description');
    $w->element('Textarea', 'content')->label('Content');    
    $w->element('Submit', 'submit')->value('submit');
    #Set constraints
    $w->constraint(All => qw/name title description/)->message('Required.');
    # Return the widget    
    return $w;

I've tried setting the action to '' but that didn't do the trick.  I'm just trying to see if I am doing something totally wrong.  Thanks!


More information about the Html-widget mailing list