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: 56373
Status: resolved
Priority: 0/
Queue: HTML-FormHandler

People
Owner: Nobody in particular
Requestors: UGEXE [...] cpan.org
Cc:
AdminCc:

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



Subject: field type Upload shows required errors twice
If a field type 'Upload' fails it's require, it returns the error twice if using HTML::FormHandler::Render::Table (otherwise it doesn't). <div class="error"><label class="label" for="my_file">My file: </ Show quoted text
label><input type="file" name="my_file" id="my_file"/>
<span class="error_message">My file field is required</span></div> <span class="error_message">My file field is required</span></td></tr> That is the html that it gives me. As you can see, it is using div tags when it should not be (using Render::Table). It does not use div tags on any of the other fields. The <div> tags are being inserted by HTML::FormHandler::Widget::Wrapper::Simple Editing out line 43 in HTML::FormHandler::Widget::Wrapper::Simple seems to fix the problem ($output .= qq{\n<span class="error_message">$_</ Show quoted text
span>} for $result->all_errors;)
However, I do not believe this is the solution, because it still puts div tags around the upload field, as can be seen by the html produced when I comment out the line I mentioned above: <div class="error"><label class="label" for="my_file">My file: </ Show quoted text
label><input type="file" name="my_file" id="my_file"/></div>
<span class="error_message">My file field is required</span></td></tr> This is all the information I could come up with.
This was fixed by the patch provided on irc, I believe.