[html-formfu] Question on dynamic select

Carl Franks fireartist at gmail.com
Fri Mar 28 07:29:41 GMT 2008


On 28/03/2008, Joe Prosser <jvprosser at gmail.com> wrote:
> Hi Folks,
> I'm trying to include a query-driven select field in a Repeatable section
> (subset shown below).
>
> Where does the "select_from_db" subroutine live and how does the query
> result need to get "munged" in order to work?
>
> Thanks,
> -Joe
>
> - type: Repeatable
>      nested_name: cust_details
>      increment_field_names: 1
>      db:
>
>      elements:
>        - type: Hidden
>          name: pkey
>
>        - type: Select
>           options: __dynamic(select_from_db)__

I'm not sure where you got the __dynamic()__ idea from - neither
formfu or catalyst support any such thing.
If you're using DBIx::Class, see the test files in svn for examples of
how to populate select options from the db using
HTML::FormFu::Model::DBIC.
http://code.google.com/p/html-formfu/source/browse/trunk/HTML-FormFu-Model-DBIC/t/options_from_model/

Carl



More information about the HTML-FormFu mailing list