/[cvs]/nfo/php/libs/com.newsblob.phphtmllib/form/form_elements/misc.inc
ViewVC logotype

Contents of /nfo/php/libs/com.newsblob.phphtmllib/form/form_elements/misc.inc

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.4 - (show annotations)
Thu Aug 11 14:09:59 2005 UTC (18 years, 11 months ago) by jonen
Branch: MAIN
CVS Tags: HEAD
Changes since 1.3: +14 -6 lines
+ updated to version 2.5.3

1 <?php
2 /**
3 * This file contains the base FormElement class.
4 *
5 * $Id: misc.inc,v 1.4.2.2 2005/05/12 01:24:03 hemna Exp $
6 *
7 * @author Walter A. Boring IV <waboring@newsblob.com>
8 * @author Suren Markossian <suren@bcsweb.com>
9 * @package phpHtmlLib
10 * @subpackage FormProcessing
11 *
12 * @copyright LGPL - See LICENCE
13 *
14 */
15
16 /**
17 * This is the Hidden FormElement which builds a
18 * input field of type="hidden". It has no validation method.
19 *
20 *
21 * @author Walter A. Boring IV <waboring@newsblob.com>
22 * @author Suren Markossian <suren@bcsweb.com>
23 * @package phpHtmlLib
24 * @subpackage FormProcessing
25 *
26 * @copyright LGPL - See LICENCE
27 */
28 class FEHidden extends FormElement {
29
30 function FEHidden($label, $value=NULL) {
31 $this->FormElement($label);
32 if ($value != NULL) {
33 $this->set_value( $value );
34 }
35 }
36
37 function get_element() {
38 $attributes = $this->_build_element_attributes();
39 $attributes["type"] = "hidden";
40
41 if (($value = $this->get_value()) != NULL)
42 $attributes["value"] = $value;
43
44 return new INPUTtag($attributes);
45
46 //return form_hidden($this->get_element_name(),
47 // $this->get_value() );
48 }
49
50 /**
51 * This method returns the hidden version of this
52 * element for a confirmation page.
53 *
54 * NOTE: This is called by the FormProcessor only.
55 * It shouldn't be called manually.
56 *
57 * @return INPUTtag of type hidden
58 */
59 function get_confirm_element() {
60 return $this->get_element();
61 }
62 }
63
64 /**
65 * This is a way of providing an Error to the FormProcessor.
66 * It can be used at any time during FormContent to create
67 * a specialized error field and message.
68 *
69 *
70 * @author Walter A. Boring IV <waboring@newsblob.com>
71 * @author Suren Markossian <suren@bcsweb.com>
72 * @package phpHtmlLib
73 * @subpackage FormProcessing
74 *
75 * @copyright LGPL - See LICENCE
76 */
77 class FEError extends FormElement {
78
79 /**
80 * The constructor
81 *
82 * @param string the error label
83 * @param string the error message
84 */
85 function FEError( $label, $message ) {
86 $this->set_label_text($label);
87 $this->set_error_message($message);
88 }
89
90 }
91 ?>

MailToCvsAdmin">MailToCvsAdmin
ViewVC Help
Powered by ViewVC 1.1.26 RSS 2.0 feed