Skip Menu |

This queue is for tickets about the CGI-FormBuilder CPAN distribution.

Report information
The Basics
Id: 27207
Status: resolved
Priority: 0/
Queue: CGI-FormBuilder

People
Owner: Nobody in particular
Requestors: mark.zealey [...] pipex.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 3.0501
Fixed in: (no value)



Subject: inflate broken
Hi, I've discovered that specifying an inflate to a field is broken when the inflate sub returns an object (the normal case, I would assume). The faulty logic is in htmlattr (Util.pm:241): # Anything but normal scalar data gets yanked next if ref $val || ! defined $val; This means that if $val is a reference (as indeed it is for an inflated value), it gets skipped. One solution would be to change that to read # Anything but normal scalar data, or an inflated object gets yanked next if $key ne 'value' && ref $val || ! defined $val; but this is a little messy. Perhaps Field/text.pm:130ish should be changed from: $attr->{value} = $value; # override delete $attr->{value} unless defined $value; to: $attr->{value} = "$value" unless defined $value; But then i assume other Fields would also have to be changed?
I appreciate this bug report - if this is still an issue, please re-file it at: https://github.com/formbuilder/formbuilder/issues