Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

(no description)

File Size: 211 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

HTML_QuickForm_input:: (2 methods):
  __construct()
  HTML_QuickForm_input()

name:: (8 methods):
  setType()
  setName()
  getName()
  setValue()
  getValue()
  toHtml()
  onQuickFormEvent()
  exportValue()


Class: HTML_QuickForm_input  - X-Ref

Base class for input form elements

__construct($elementName=null, $elementLabel=null, $attributes=null)   X-Ref
Class constructor

param: string     Input field name attribute
param: mixed      Label(s) for the input field
param: mixed      Either a typical HTML attribute string or an associative array
return: void

HTML_QuickForm_input($elementName=null, $elementLabel=null, $attributes=null)   X-Ref
Old syntax of class constructor. Deprecated in PHP7.


Class: name  - X-Ref

setType($type)   X-Ref
Sets the element type

param: string    $type   Element type
return: void

setName($name)   X-Ref
Sets the input field name

param: string    $name   Input field name attribute
return: void

getName()   X-Ref
Returns the element name

return: string

setValue($value)   X-Ref
Sets the value of the form element

param: string    $value      Default value of the form element
return: void

getValue()   X-Ref
Returns the value of the form element

return: string

toHtml()   X-Ref
Returns the input field in HTML

return: string

onQuickFormEvent($event, $arg, &$caller)   X-Ref
Called by HTML_QuickForm whenever form event is made on this element

param: string    $event  Name of event
param: mixed     $arg    event arguments
param: object    $caller calling object
return: void

exportValue(&$submitValues, $assoc = false)   X-Ref
We don't need values from button-type elements (except submit) and files