[html-formfu] Repeatable elements, number of empty rows on a "create" form.

Carl Franks fireartist at gmail.com
Mon Mar 1 18:52:15 GMT 2010


On 1 March 2010 15:43, Brian Cassidy <brian.cassidy at gmail.com> wrote:
> This may be a "Monday" issue, but I can't seem to get this simple
> example to work. I simply want to be able to enter 3 "sponsors" in my
> create form (note, the snippet below is part of a larger form). I only
> ever get 1 set of name-type pairs.
>
> Can anyone hit me with a clue bat?
>
> - type: Hidden
>  name: sponsors_count
> - type: Repeatable
>  nested_name: sponsors
>  counter_name: sponsors_count
>  attributes:
>    class: repeatable
>  model_config:
>    empty_rows: 3
>  elements:
>    - type: Select
>      label: Sponsor Type
>      name: sponsor_type_id
>      empty_first: 1
>      model_config:
>        resultset: SponsorType
>    - type: Text
>      label: Name
>      name: name
> --

I think you'll also need to set 'new_rows_max'.

Cheers,
Carl



More information about the HTML-FormFu mailing list