MWException: Don't send headers multiple times
[mediawiki.git] / includes / htmlform / HTMLHiddenField.php
blob6ea95ed1447146769328e09c005fc4d9a36c9f71
1 <?php
3 class HTMLHiddenField extends HTMLFormField {
4 public function __construct( $params ) {
5 parent::__construct( $params );
7 # Per HTML5 spec, hidden fields cannot be 'required'
8 # http://www.w3.org/TR/html5/forms.html#hidden-state-%28type=hidden%29
9 unset( $this->mParams['required'] );
12 public function getTableRow( $value ) {
13 $params = array();
14 if ( $this->mID ) {
15 $params['id'] = $this->mID;
18 $this->mParent->addHiddenField( $this->mName, $this->mDefault, $params );
20 return '';
23 /**
24 * @since 1.20
26 public function getDiv( $value ) {
27 return $this->getTableRow( $value );
30 /**
31 * @since 1.20
33 public function getRaw( $value ) {
34 return $this->getTableRow( $value );
37 public function getInputHTML( $value ) {
38 return '';