[html-formfu] form->process not working!

Ben Sommer ben at bensommer.com
Sun Oct 19 03:47:18 BST 2008


On Sat, Oct 18, 2008 at 5:58 PM, Carl Franks <fireartist at gmail.com> wrote:

> 2008/10/18 Ben Sommer <ben at bensommer.com>:
> > On Sat, Oct 18, 2008 at 5:33 PM, Carl Franks <fireartist at gmail.com>
> wrote:
> >>
> >> 2008/10/18 Ben Sommer <ben at bensommer.com>:
> >> > Thanks for the swift response, Carl.
> >> >
> >> > The dump you requested is attached.
> >>
> >> indicator() is set to 'submit'
> >> but your submit button is named 'save', so submitted() will never be
> >> true, as there's no submitted parameter named 'submit'
> >
> > Thanks Carl -- good catch that the submit button was named "save".
> >
> > Unfortunately, I do this on purpose -- I explicitly check for this field
> and
> > don't use the "submitted()" or "submitted_and_valid()" methods.
> >
> > My "$form->params" data structure is still undefined after I invoke
> > $form->process($c->request) -- whatever element names I use.
> >
> > Any more hunches on this?
>
> process() calculates submitted(), and if it's false, will return
> without building the params structure.
>
> $form->params() only contains known and valid values, which can't
> happen if it thinks there's been no form submitted.
>
> I suggest you just remove your indicator setting, that way submitted()
> will be true if any known field is submitted, and process() will build
> the params as you expect.
>


Bless you, Carl -- it worked. Thanks.


> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20081018/1d=
c22172/attachment.htm


More information about the HTML-FormFu mailing list