cvs commit: p5ee/App-Widget/lib/App/Widget Hidden.pm

[email protected] (Stephen Adkins)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
cvsuser     05/10/20 13:33:10

  Added:       App-Widget/lib/App/Widget Hidden.pm
  Log:
  new
  
  Revision  Changes    Path
  1.1                  p5ee/App-Widget/lib/App/Widget/Hidden.pm
  
  Index: Hidden.pm
  ===================================================================
  
  ######################################################################
  ## $Id: Hidden.pm,v 1.1 2005/10/20 20:33:10 spadkins Exp $
  ######################################################################
  
  package App::Widget::Hidden;
  $VERSION = do { my @r=(q$Revision: 1.1 $=~/\d+/g); sprintf "%d."."%02d"x$#r,@r};
  
  use App;
  use App::Widget;
  @ISA = ( "App::Widget" );
  
  use strict;
  
  =head1 NAME
  
  App::Widget::Hidden - An HTML hidden field
  
  =head1 SYNOPSIS
  
     $name = "first_name";
  
     # official way
     use App;
     $context = App->context();
     $w = $context->widget($name);
     # OR ...
     $w = $context->widget($name,
        class => "App::Widget::Hidden",
     );
  
     # internal way
     use App::Widget::Hidden;
     $w = App::Widget::Hidden->new($name);
  
  =cut
  
  =head1 DESCRIPTION
  
  This class is a <input type=hidden> HTML element.
  
  =cut
  
  sub html {
      my $self = shift;
      my ($name, $value, $html_value, $html, $var, $size, $maxlength, $tabindex);
      $name = $self->{name};
      $value = $self->get_value();
      $html_value = $self->html_escape($value);
      $html = "<input type=\"hidden\" name=\"${name}\" value=\"$html_value\" />";
      $html;
  }
  
  1;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.