Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the HTML-FormHandler CPAN distribution.

Report information
The Basics
Id: 73135
Status: rejected
Priority: 0/
Queue: HTML-FormHandler

People
Owner: Nobody in particular
Requestors: h.dudeness [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.35005
Fixed in: (no value)



Subject: Rendering Textarea
HTML-FormHandler-0.35005 perl v5.8.8 Linux 2.6.18-194.el5 I have an issue when redering textareas in HTML::FormHandler::Render::Table. It seems the attribute rows is placed right next to the input class. I have a field defined like this: has_field 'address' => ( type => 'TextArea', label => 'Address', required => 1, input_class => '{required:true}', css_class => 'required', cols => 30, rows => 10, maxlength => 200, ); That renders like this: <textarea name="address" id="address" class="{required:true}"rows="10" cols="30"> </textarea>
The input_class is just for adding a class string (and will be deprecated soon). The way to do what you want is: has_field 'address' => ( type => 'TextArea', label => 'Address', required => 1, html_attr => { required => "required"}, css_class => 'required', cols => 30, rows => 10, maxlength => 200, ); Gerda
From: h.dudeness [...] gmail.com
On Fri Dec 09 20:30:41 2011, GSHANK wrote: Show quoted text
> The input_class is just for adding a class string (and will be > deprecated soon). The way to do > what you want is: > has_field 'address' => ( > type => 'TextArea', > label => 'Address', > required => 1, > html_attr => { required => "required"}, > css_class => 'required', > cols => 30, > rows => 10, > maxlength => 200, > ); >
That will add class="{required:true}" to the textarea?
No. What are you trying to get? I thought you were complaining about class="{required: true}". Gerda
From: h.dudeness [...] gmail.com
On Sat Dec 10 18:47:52 2011, GSHANK wrote: Show quoted text
> No. What are you trying to get? I thought you were complaining about > class="{required: true}". > > Gerda
No, sorry for the confusion. Instead of this: <textarea name="address" id="address" class="{required:true}"rows="10" cols="30"> </textarea> I want this: <textarea name="address" id="address" class="{required:true}" rows="10" cols="30"> </textarea> There is a space. between " and rows. Just a small change and does not cause any real problems besides html validation. But you have mentioned that input_class will be deprecated. What is the proper way to to add class to elements?
I tried your field with HTML::FormHandler::Render::Table, and I did not get the missing space. In the future, it will be preferred to use html_attr => { class => '{required: true}' } Gerda
No problem found. Let me know if you still have an issue.