[html-formfu] The values of disabled form items

Octavian Rasnita orasnita at gmail.com
Fri Sep 3 05:27:45 GMT 2010


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" <fireartist at gmail.com>
To: "HTML Form Creation,Rendering and Validation Framework" 
<html-formfu at 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 <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
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at 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






More information about the HTML-FormFu mailing list