[Catalyst] FormBuilder: HOWTO make a particular OPTION disabled in a SELECT form?

Derek Wueppelmann dwueppel at gmail.com
Mon Jun 14 13:46:01 GMT 2010


On Sat, 2010-06-12 at 18:05 -0500, will at serensoft.com wrote:
> Catalyst (and Chaining in particular) is really, really sweet!
> Enjoying the exploration immensely. So here's our next puzzle:
<snip>
> But that just gives
> <option>Delta (inactive)</option>
> Is there a way to include DISABLED options without s/// after
> $form->prepare?

You can manually render the form if you wish and then you can decide
what to do when the value is undef, or your choice of value. That being
said I can see why you would want to use the built-in render method. You
should be able to perform any action on the $self->formbuilder object as
you would to a CGI::FormBuilder, however a quick look through the man
page and it doesn't seem like there is a built-in to disable a specific
option. So it looks like you are going to have to manually render that
form. That being said the default rendering template is fairly basic.

-- 
 o)   Derek Wueppelmann           (o
(D .   dwueppel at gmail.com          D).
((`     http://www.monkeynet.ca   ( ) `





More information about the Catalyst mailing list