wiki.techinc.nl/includes/htmlform/HTMLHiddenField.php
addshore 8fa2314b2e Formatting fixes in includes/htmlform/*
Change-Id: Iee9e4f3fcf8491022ffe97c74312871f97f8ce9c
2013-12-09 14:23:05 +01:00

40 lines
792 B
PHP

<?php
class HTMLHiddenField extends HTMLFormField {
public function __construct( $params ) {
parent::__construct( $params );
# Per HTML5 spec, hidden fields cannot be 'required'
# http://dev.w3.org/html5/spec/states-of-the-type-attribute.html#hidden-state
unset( $this->mParams['required'] );
}
public function getTableRow( $value ) {
$params = array();
if ( $this->mID ) {
$params['id'] = $this->mID;
}
$this->mParent->addHiddenField( $this->mName, $this->mDefault, $params );
return '';
}
/**
* @since 1.20
*/
public function getDiv( $value ) {
return $this->getTableRow( $value );
}
/**
* @since 1.20
*/
public function getRaw( $value ) {
return $this->getTableRow( $value );
}
public function getInputHTML( $value ) {
return '';
}
}