[html-formfu] Best approach for multiple item editing
Nigel Metheringham
nigel.metheringham at dev.intechnology.co.uk
Fri Oct 3 16:33:32 BST 2008
On 30 Sep 2008, at 13:23, Carl Franks wrote:
> You can do most of this already with a Repeatable block element, and
> HTML::FormFu::Model::DBIC
One issue I am hitting when playing with this is whats happening
in a Select or similar element.
I've got a bookings form:-
elements:
- legend: Booking
type: Fieldset
elements:
- name: id
type: Hidden
- label: Booking Type
model_config:
resultset: BookingType
name: booking_type
type: Select
- label: Start
name: start
type: Text
- label: End
name: end
type: Text
This works fine as an individual form.
If I wrap it in a repeatable from a parent object, it works fine
except that the booking_type Select has no options filled in.
Interestingly the options_from_model method is called (just once no
matter how many items are involved), and the appropriate values
returned back. If I manually fill in the options that works...
I've not as yet managed to chase down where in the stack the options
are getting detached from the items.
On a similar vein, is it possible at present to have options set from
something like a callback or method on the object used to populate the
defaults?
Nigel.
--
[ Nigel Metheringham Nigel.Metheringham at InTechnology.com ]
[ - Comments in this message are my own and not ITO opinion/policy - ]
More information about the HTML-FormFu
mailing list