[Html-widget] Read-only attribute?
Ash Berlin
ash at cpan.org
Thu Jun 22 13:32:25 CEST 2006
Michael Gray wrote:
> On Wed, 21 Jun 2006, Adam Sjøgren wrote:
>
>
>> On Wed, 21 Jun 2006 16:06:25 +0100 (BST), Michael wrote:
>>
>>
>>> I could do this by hand in the code by choosing between a Textfield or a
>>> Span, but it would be much nicer if I could just add a "->readonly(1)"
>>> to the element and have it Do The Right Thing, taking care of outputting
>>> the label and the read-only value in a suitable fashion.
>>>
>> Setting the HTML attribute disabled="disabled" on the element could
>> perhaps be a solution¹?
>>
>> ¹ <http://www.w3.org/TR/html4/interact/forms.html#adef-disabled>
>>
>
> Yup, that does it, thanks!
>
> (I was sure that there should have been such an attribute, but neither
> of the quick-refs I browsed mentioned 'disabled' or 'readonly'. I
> should have gone to the source!)
>
> Cheers
>
>
$e->attributes({readonly=>'readonly'})
More information about the Html-widget
mailing list