CWIS Developer Documentation

- Home
- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

CheckboxFormField.php
Go to the documentation of this file.
1 <?PHP
2 #
3 # FILE: Classification.php
4 #
5 # Part of the Collection Workflow Integration System (CWIS)
6 # Copyright 2013 Edward Almasy and Internet Scout Research Group
7 # http://scout.wisc.edu/cwis/
8 #
9
14 class CheckboxFormField extends FormField
15 {
16
17 # ---- PUBLIC INTERFACE --------------------------------------------------
18
24 public function __construct($Name, $Label)
25 {
26 parent::__construct($Name, FALSE, $Label, NULL, NULL);
27 }
28
34 public function PrintField($DisplayErrorIndicator = FALSE)
35 {
36 $this->PrintInput($DisplayErrorIndicator);
37 $this->PrintLabel($DisplayErrorIndicator);
38 }
39
45 public function PrintInput($DisplayErrorIndicator = FALSE)
46 {
47 print("<input type=\"checkbox\""
48 ." name=\"".$this->MyName."\""
49 ." id=\"".$this->MyName."\""
50 .($this->MyValue ? " checked" : "")
51 .">\n");
52 }
53
54
55 # ---- PRIVATE INTERFACE -------------------------------------------------
56 }
57
CheckboxFormField
Generator for checkbox input fields.
Definition: CheckboxFormField.php:14
FormField
Generator for HTML form fields.
Definition: FormField.php:14
CheckboxFormField\PrintInput
PrintInput($DisplayErrorIndicator=FALSE)
Generate HTML just for the input field.
Definition: CheckboxFormField.php:45
CheckboxFormField\__construct
__construct($Name, $Label)
Object constructor.
Definition: CheckboxFormField.php:24
PHP
PHP
Definition: RSSClient--Test.php:12
CheckboxFormField\PrintField
PrintField($DisplayErrorIndicator=FALSE)
Generate HTML for the int field and label.
Definition: CheckboxFormField.php:34
FormField\PrintLabel
PrintLabel($DisplayErrorIndicator=FALSE)
Print the label for this form field without generating the input tags.
Definition: FormField.php:134