3 # FILE: TextFormField.php 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/ 17 # ---- PUBLIC INTERFACE -------------------------------------------------- 35 $Name, $IsRequired, $Label, $Length, $MaxLength,
36 $ValidFunc = NULL, $ValidMsgs = NULL)
38 $this->MyLength = $Length;
39 $this->MyMaxLength = $MaxLength;
41 parent::__construct($Name, $IsRequired, $Label, $ValidFunc, $ValidMsgs);
54 public function Length($NewVal = NULL)
56 return $this->GetOrSet(
"MyLength", $NewVal);
66 return $this->GetOrSet(
"MyMaxLength", $NewVal);
78 public function PrintInput($DisplayErrorIndicator = FALSE)
80 print(
"<input type=\"".
82 (method_exists($this,
"PasswordFormField") ?
"password" :
"text")
84 .
" name=\"".$this->MyName.
"\"" 85 .
" value=\"".htmlspecialchars($this->MyValue).
"\"" 86 .
" size=\"".$this->MyLength.
"\"" 87 .
" maxlength=\"".$this->MyMaxLength.
"\"" 88 .($DisplayErrorIndicator ?
" style=\"background-color: #FFEEEE;\"" :
"")
94 # ---- PRIVATE INTERFACE ------------------------------------------------- Length($NewVal=NULL)
Get or set the display length for this field.
MaxLength($NewVal=NULL)
Get or set the maximum input length for this field.
Generator for text input fields.
PrintInput($DisplayErrorIndicator=FALSE)
Generate HTML for this object.
__construct($Name, $IsRequired, $Label, $Length, $MaxLength, $ValidFunc=NULL, $ValidMsgs=NULL)
Object Constructor.