Debian Codegraph @

Embperl/Form/Control/hidden.pm

raw
1 ###################################################################################
2 #
3 # Embperl - Copyright (c) 1997-2008 Gerald Richter / ecos gmbh www.ecos.de
4 # Embperl - Copyright (c) 2008-2014 Gerald Richter
5 #
6 # You may distribute under the terms of either the GNU General Public
7 # License or the Artistic License, as specified in the Perl README file.
8 #
9 # THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR
10 # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
11 # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
12 #
13 # $Id$
14 #
15 ###################################################################################
16
17 package Embperl::Form::Control::hidden ;
18
19 use strict ;
20 use base 'Embperl::Form::Control' ;
21
22 use Embperl::Inline ;
23
24 sub noframe { return 1; }
25
26 # ---------------------------------------------------------------------------
27 #
28 # is_hidden - returns true if this is a hidden control
29 #
30
31 sub is_hidden
32
33 {
34 my ($self, $req) = @_ ;
35
36 return 1 ;
37 }
38
39 sub show_control { show (@_) ; }
40 sub show_control_readonly { show (@_) ; }
41
42
43 1 ;
44
45 __EMBPERL__
46
47 [# ---------------------------------------------------------------------------
48 #
49 # show_control - output the control
50 #]
51
52 [$ sub show ($self, $req)
53
54 my $name = $self->{name};
55 my $value = exists $self->{value} ? $self->{value} : $fdat{$name};
56
57 $]
58 <input type="hidden" name="[+ $name +]" value="[+ $value +]" id="[+ $self->{id} +]">
59 [$endsub$]
60
61 __END__
62
63 =pod
64
65 =head1 NAME
66
67 Embperl::Form::Control::hidden - A hidden form field control inside an Embperl Form
68
69
70 =head1 SYNOPSIS
71
72 {
73 type => 'hidden',
74 name => 'foo',
75 }
76
77 =head1 DESCRIPTION
78
79 Used to create a hidden form field control inside an Embperl Form.
80 See Embperl::Form on how to specify parameters.
81
82 =head2 PARAMETER
83
84 =head3 type
85
86 Needs to be set to 'hidden'.
87
88 =head3 name
89
90 Will be used as name for the hidden input field.
91
92 =head1 Author
93
94 G. Richter (richter at embperl dot org), A. Beckert ([email protected])
95
96 =head1 See Also
97
98 perl(1), Embperl, Embperl::Form
99
100