CWIS Developer Documentation
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 {
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 
Generator for checkbox input fields.
Generator for HTML form fields.
Definition: FormField.php:14
PrintInput($DisplayErrorIndicator=FALSE)
Generate HTML just for the input field.
__construct($Name, $Label)
Object constructor.
PrintField($DisplayErrorIndicator=FALSE)
Generate HTML for the int field and label.
PrintLabel($DisplayErrorIndicator=FALSE)
Print the label for this form field without generating the input tags.
Definition: FormField.php:134