Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is supported too.

submit type form element Contains HTML class for a submit type element

Copyright: 2006 Jamie Pratt <me@jamiep.org>
License: http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
File Size: 156 lines (6 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 1 file
 lib/form/templatable_form_element.php

Defines 2 classes

MoodleQuickForm_submit:: (2 methods):
  __construct()
  MoodleQuickForm_submit()

name:: (4 methods):
  onQuickFormEvent()
  getElementTemplateType()
  freeze()
  export_for_template()


Class: MoodleQuickForm_submit  - X-Ref

submit type form element

HTML class for a submit type element

__construct($elementName=null, $value=null, $attributes=null, $primary = null, $options = [])   X-Ref
constructor

param: string $elementName (optional) name of the field
param: string $value (optional) field label
param: string $attributes (optional) Either a typical HTML attribute string or an associative array
param: bool|null $primary Is this button a primary button?
param: array $options Options to further customise the submit button. Currently accepted options are:

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


Class: name  - X-Ref

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

getElementTemplateType()   X-Ref
Slightly different container template when frozen. Don't want to display a submit
button if the form is frozen.

return: string

freeze()   X-Ref
Freeze the element so that only its value is returned


export_for_template(renderer_base $output)   X-Ref
No description