On 13/09/2007, Zbigniew Lukasiak <[EMAIL PROTECTED]> wrote: > Adding options to a select input and DBIx::Class::HTML::FormFu > > Do I understand right that adding options is done at the create time? > Or can it be done later? > > In HTML::Widget::DBIC I've decided that indeed creating the options > should be done at create time - and thats why I pass the DBIC schema > to the create method instead of having a populate_from_form method.
They can be added at any time - options() is just a method on the element object. Although, it might cause problems if you: * use a form populated by Catalyst::Controller::HTML::FormFu's FormConfig() or FormMethod() * have an AutoSet constraint on the select field * add the options during your controller's action routine ... because by that time, $form->process() will already have been called, and the lack of options will cause the field to not pass the constraint. How do you imagine the form being created - what sort of API? Will there be a controller Action class to replace the likes of FormConfig() ? Carl _______________________________________________ HTML-FormFu mailing list HTML-FormFu@lists.scsys.co.uk http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu