[html-formfu] Fwd: Model::DBIC: creating many new rows

Carl Franks fireartist at gmail.com
Fri Aug 1 11:16:17 BST 2008


2008/7/25 Moritz Onken <onken at houseofdesign.de>:
>
> referring to this post:
>
> http://lists.scsys.co.uk/pipermail/html-formfu/2008-April/001158.html
>
> I created the following patch which allows the user to specify a
> new_empty_rows config option.
> This allows the user to add as many new rows as he wishes. He can still
> restrict it by putting
> a constraint on the count field.

Hmm, not sure if you tried running the test ;) the tests failed, the
count was out - and I don't think the .pm patch does what it should.
But anyway, moving on...

The only thing I'm not keen on is the similarity between the method
names 'new_empty_row' and 'new_empty_rows'.
Too confusing.

Currently, 'new_empty_row' must be set to a column-name or array-ref of names.
Instead of 'new_empty_rows', how about adding a 'new_empty_row_max'
(or something similar) which defaults to 1, but can be set to any
number, and -1 means 'no limit'?

Carl



More information about the HTML-FormFu mailing list