[html-formfu] More complex DBIC/FormFu interaction
Carl Franks
fireartist at gmail.com
Thu Sep 2 20:38:46 GMT 2010
On 1 September 2010 12:51, Nigel Metheringham
<nigel.metheringham at dev.intechnology.co.uk> wrote:
> Just to follow up to my own message...
>
> I won't rehash the problem, but I will present the solution in case
> anyone else is trying something similar...
>
> The YAML form config should be changed to
> elements:
> - type: Checkboxgroup
> name: bookings
> model_config:
> label_column: text_info
> resultset: Booking
> attributes:
> order_by: start
> prefetch: booking_type
> condition_from_stash:
> event: event_id
>
> and then the following code should be added before the
> # check and process form
> section of the code:-
> # stash event restriction for use within form
> $form->stash->{event_id} = $event->id;
> $form->process;
>
> The additional process step is needed (otherwise the value is taken
> from when the previous process was run within the
> Catalyst::Controller::HTML::FormFu superclass.
>
>
> Carl: this isn't documented, but there are tests - thankfully which
> makes it much easier to work out whats happening. I'll see if I can
> come up with a doc patch for it.
Thanks for following this up.
I've added some docs for this.
Cheers,
Carl
More information about the HTML-FormFu
mailing list