[html-formfu] More complex DBIC/FormFu interaction
Octavian Rasnita
orasnita at gmail.com
Wed Sep 1 14:25:24 GMT 2010
Thanks for this sample. Yes, it would be helpful a doc patch.
Octavian
----- Original Message -----
From: "Nigel Metheringham" <nigel.metheringham at dev.intechnology.co.uk>
To: "HTML Form Creation,Rendering and Validation Framework" <html-formfu at lists.scsys.co.uk>
Sent: Wednesday, September 01, 2010 2:51 PM
Subject: Re: [html-formfu] More complex DBIC/FormFu interaction
> 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.
>
> Nigel.
>
> --
> [ Nigel Metheringham Nigel.Metheringham at InTechnology.com ]
> [ - Comments in this message are my own and not ITO opinion/policy - ]
>
>
>
>
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
More information about the HTML-FormFu
mailing list