HTML::...Display(3pm)
okay bestie, this is the HTML::...Display(3pm) page β a User Contributed Perl Documentation moment β and it's all about HTML::FormHandler::Field::Display, the display-only field. Ngl, it's giving βlook cute, don't submit anythingβ energy π
β¨
πΈ NAME πΈ
HTML::FormHandler::Field::Display β a display only field. That's it, that's the whole name section, periodt. π
π¦ VERSION π¦
version 0.40068 β noted, bestie. no cap. β
β¨ SYNOPSIS β¨
This class can be used for fields that are display only. It will render the value returned by a form's html_<field_name> method, or the field's html attribute. Lowkey iconic: the display field just shows the tea. π₯
Here's the simplest vibe β set the html attribute:
has_field 'explanation' => ( type => 'Display',
html => '<p>This is an explanation...</p>' );
or in a form, let the form's html_<field_name> method decide what to render:
has_field 'explanation' => ( type => 'Display' );
sub html_explanation {
my ( $self, $field ) = @_;
if( $self->something ) {
return '<p>This type of explanation...</p>';
}
else {
return '<p>Another type of explanation...</p>';
}
}
#----
has_field 'username' => ( type => 'Display' );
sub html_username {
my ( $self, $field ) = @_;
return '<div><b>User: </b>' . $field->value . '</div>';
}
or set the name of the rendering method with set_html:
has_field 'explanation' => ( type => 'Display', set_html => 'my_explanation' );
sub my_explanation {
....
}
or provide a render_method:
has_field 'my_button' => ( type => 'Display', render_method => \&render_my_button );
sub render_my_button {
my $self = shift;
....
return '...';
}
bestie, every one of those is a way to tell the display field what to render. that's the whole assignment. π
π AUTHOR π
FormHandler Contributors - see HTML::FormHandler. π
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2017 by Gerda Shank.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. π«Ά
mwah π this page's source/version is perl v5.34.0, dated 2022-03-25, and the page title is HTML::...Display(3pm). bye bestie, go render something cute ππ
π¦ where this page comes from
- debian bookworm: libhtml-formhandler-perl 0.40068-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libhtml-formhandler-perl 0.40068-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-formhandler-perl 0.40068-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhtml-formhandler-perl 0.40068-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms