GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  HTML::FORMHANDLER::FIELD::DISPLAY (3)

.ds Aq ’

NAME

HTML::FormHandler::Field::Display - display only field

CONTENTS

VERSION

version 0.40065

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.



  has_field explanation => ( type => Display,
     html => <p>This is an explanation...</p> );



or in a form:



  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:



   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 ...;
   }



AUTHOR

FormHandler Contributors - see HTML::FormHandler

COPYRIGHT AND LICENSE

This software is copyright (c) 2016 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.

Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 HTML::FORMHANDLER::FIELD::DISPLAY (3) 2016-03-20

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.