CWIS Developer Documentation
CheckboxFormField.php
Go to the documentation of this file.
1 <?PHP
2 
8 class CheckboxFormField extends FormField {
9 
10  # ---- PUBLIC INTERFACE --------------------------------------------------
11 
17  function CheckboxFormField($Name, $Label)
18  {
19  $this->FormField($Name, FALSE, $Label, NULL, NULL);
20  }
21 
27  function PrintField($DisplayErrorIndicator = FALSE)
28  {
29  $this->PrintInput($DisplayErrorIndicator);
30  $this->PrintLabel($DisplayErrorIndicator);
31  }
32 
38  function PrintInput($DisplayErrorIndicator = FALSE)
39  {
40  print("<input type=\"checkbox\""
41  ." name=\"".$this->MyName."\""
42  ." id=\"".$this->MyName."\""
43  .($this->MyValue ? " checked" : "")
44  .">\n");
45  }
46 
47 
48  # ---- PRIVATE INTERFACE -------------------------------------------------
49 
50 }
51 
52 ?>