Merge pull request #5205 from solgenomics/topic/generic_trial_upload
[sgn.git] / lib / CXGN / Page / Form / EditableHidden.pm
blob74615483d533be63b4acde1fa91360a039a30a15
2 =head1 NAME
4 EditableHidden.pm
6 =head1 DESCRIPTION
8 Deals with the representation of hidden fields on editable forms. The hidden field itself is of course not editable -- the editable in the name just means that it will be rendered on an editable form.
10 For more information, see L<CXGN::Page::Form>.
12 =head1 AUTHOR(S)
14 Lukas Mueller (lam87@cornell.edu)
16 =head1 FUNCTIONS
18 The following functions are overridden from the parent class CXGN::Page::Form::Hidden which itself implements the CXGN::Page::Form::ElementI interface.
20 =cut
22 use strict;
23 use CXGN::Page::Form::Hidden;
25 package CXGN::Page::Form::EditableHidden;
27 use base qw / CXGN::Page::Form::Hidden /;
29 =head2 new
31 Usage:
32 Desc:
33 Ret:
34 Args:
35 Side Effects:
36 Example:
38 =cut
40 sub new {
41 my $class = shift;
42 my $self = $class->SUPER::new(@_);
44 return $self;
47 =head2 render
49 Usage:
50 Desc:
51 Ret:
52 Args:
53 Side Effects:
54 Example:
56 =cut
58 sub render {
59 my $self = shift;
61 my $id = $self->get_id();
62 my $name = $self->get_field_name();
63 my $value = $self->get_contents();
65 my $s = qq { <input type="hidden" id="$id" name="$name" value="$value" /> };
66 return $s;
70 return 1;