We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hi! Thanks for maintaining HTML::FormHandler. Just had a question about CheckboxGroup & rendering.
Following this documentation, following example works fine: It wraps outer label of checkbox group.
has_field 'my_select' => ( type => 'Select', label => 'This is a label', widget => 'CheckboxGroup', options => [ {value => 'x', label => 'labelx',}, {value => 'y', label => 'labely',} ], wrap_label_method => \&wrap_label, # <--- WRAPPING HERE ); sub wrap_label { my ( $self, $label ) = @_; return qq{<a href="...">$label</a>}; }
However, I could not get the same to work for labels for each option inside the checkbox. So, for example, this doesn't wrap labels of options.
has_field 'my_select' => ( type => 'Select', label => 'This is a label', widget => 'CheckboxGroup', options => [ {value => 'x', label => 'labelx', wrap_label_method => \&wrap_label, }, # <--- WRAPPING HERE {value => 'y', label => 'labely', wrap_label_method => \&wrap_label, }, # <--- WRAPPING HERE ], ); sub wrap_label { my ( $self, $label ) = @_; return qq{<a href="...">$label</a>}; }
I was wondering if there's an existing way to achieve this. If not, would you be interested in a PR that introduces this functionality?
Thanks a lot!
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi! Thanks for maintaining HTML::FormHandler. Just had a question about CheckboxGroup & rendering.
Following this documentation, following example works fine: It wraps outer label of checkbox group.
However, I could not get the same to work for labels for each option inside the checkbox. So, for example, this doesn't wrap labels of options.
I was wondering if there's an existing way to achieve this. If not, would you be interested in a PR that introduces this functionality?
Thanks a lot!
The text was updated successfully, but these errors were encountered: