Thanks Carl. I was goind to check if that field is sent by the browser if it
is disabled.
I think that if it is not sent it should be like when it wouldn't be a part
of the form at all, and in that case DBIC wouldn't need to set anything for
it in the database. It would update just the other fields...
In that case the disabled field could be displayed just for informing
purposes without having a bad effect for the database.
--
Octavian
----- Original Message -----
From: "Carl Franks" <fireart...@gmail.com>
To: "HTML Form Creation,Rendering and Validation Framework"
<html-formfu@lists.scsys.co.uk>
Sent: Thursday, September 02, 2010 11:20 PM
Subject: Re: [html-formfu] The values of disabled form items
Hi,
On 2 September 2010 21:01, Octavian Rasnita <orasn...@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
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
__________ Information from ESET NOD32 Antivirus, version of virus
signature database 5419 (20100902) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
__________ Information from ESET NOD32 Antivirus, version of virus signature
database 5419 (20100902) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
_______________________________________________
HTML-FormFu mailing list
HTML-FormFu@lists.scsys.co.uk
http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu