CWIS Developer Documentation

- Home
- Main Page
- 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
15 class CheckboxFormField extends FormField {
16
17 # ---- PUBLIC INTERFACE --------------------------------------------------
18
24 function CheckboxFormField($Name, $Label)
25 {
26 $this->FormField($Name, FALSE, $Label, NULL, NULL);
27 }
28
34 function PrintField($DisplayErrorIndicator = FALSE)
35 {
36 $this->PrintInput($DisplayErrorIndicator);
37 $this->PrintLabel($DisplayErrorIndicator);
38 }
39
45 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 }
58
59 ?>
CheckboxFormField
Generator for checkbox input fields.
Definition: CheckboxFormField.php:15
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
FormField\FormField
FormField($Name, $IsRequired, $Label, $ValidFunc, $ValidMsgs)
Object Constructor.
Definition: FormField.php:32
PHP
PHP
Definition: OAIClient.php:39
CheckboxFormField\PrintField
PrintField($DisplayErrorIndicator=FALSE)
Generate HTML for the int field and label.
Definition: CheckboxFormField.php:34
CheckboxFormField\CheckboxFormField
CheckboxFormField($Name, $Label)
Object constructor.
Definition: CheckboxFormField.php:24
FormField\PrintLabel
PrintLabel($DisplayErrorIndicator=FALSE)
Print the label for this form field without generating the input tags.
Definition: FormField.php:119