1 |
<?php |
2 |
/** |
3 |
* This file contains the base FormElement class. |
4 |
* |
5 |
* $Id: misc.inc,v 1.3 2003/02/18 23:02:01 hemna Exp $ |
6 |
* |
7 |
* @author Walter A. Boring IV <waboring@buildabetterweb.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@buildabetterweb.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 |
return form_hidden($this->get_element_name(), |
39 |
$this->get_value() ); |
40 |
} |
41 |
} |
42 |
|
43 |
/** |
44 |
* This is a way of providing an Error to the FormProcessor. |
45 |
* It can be used at any time during FormContent to create |
46 |
* a specialized error field and message. |
47 |
* |
48 |
* |
49 |
* @author Walter A. Boring IV <waboring@buildabetterweb.com> |
50 |
* @author Suren Markossian <suren@bcsweb.com> |
51 |
* @package phpHtmlLib |
52 |
* @subpackage FormProcessing |
53 |
* |
54 |
* @copyright LGPL - See LICENCE |
55 |
*/ |
56 |
class FEError extends FormElement { |
57 |
|
58 |
/** |
59 |
* The constructor |
60 |
* |
61 |
* @param string the error label |
62 |
* @param string the error message |
63 |
*/ |
64 |
function FEError( $label, $message ) { |
65 |
$this->set_label_text($label); |
66 |
$this->set_error_message($message); |
67 |
} |
68 |
|
69 |
} |
70 |
?> |