[html-formfu] The values of disabled form items
Carl Franks
fireartist at gmail.com
Thu Sep 2 20:20:26 GMT 2010
Hi,
On 2 September 2010 21:01, Octavian Rasnita <orasnita at gmail.com> wrote:
> I've seen that if I set a form item (text field) as disabled, even if it contains data, HTML::FormFu::DBIC sees it as undef.
> Is this way of working intended?
>
> I want to set it as disabled for not allowing the user to change it but I want the data to be sent.
I'm afraid not - if the field has the disabled="disabled" attribute,
the browser doesn't send a key/value pair to the server for that
field.
However, if you add
$element->model_config->{readonly} = 1;
to the field before calling update() it won't be set undef.
Carl
More information about the HTML-FormFu
mailing list