On 9/22/05, Guest via RT <bug-Maypole-FormBuilder@rt.cpan.org> wrote:
Show quoted text>
> This message about Maypole-FormBuilder was sent to you by guest <> via rt.cpan.org
>
> Full context and any attached attachments can be found at:
> <URL:
https://rt.cpan.org/Ticket/Display.html?id=14711 >
>
> I noticed that I can't do request->as_form(fields => [ some fields ]). It just uses the fb_defaults. Is this by design?
>
Not intentionally, but I think it's wrong to specify options like this
in the template. The problem is, the form is generated twice during a
submission request - once to handle the submission (e.g. in do_edit),
and then again in the template (if the action sends you back to the
same template). Both these forms need to be as near as dammit
identical, so as much as possible, you should funnel your form-buildng
through setup_form_mode.
Show quoted text> In M:F:Model, in the EDIT coderef, there is a line:
> $args->{fields} = [ $proto->edit_columns ], # $proto->related ];
>
> Should that be an ||= instead?
>
Remember you can define your own setup_form_mode() in your models and
change things you don't like. I'm going to leave things like that as
they are, to encourage users to put form configs in setup_form_mode(),
but you can override it.
d.