PHP Class Contao\Form

Provide methods to handle front end forms.
Inheritance: extends Hybrid
Datei anzeigen Open project: contao/core-bundle Class Usage Examples

Protected Properties

Property Type Description
$arrFormUsages array Form usages during same request
$objModel FormModel Model
$strKey string Key
$strTable string Table
$strTemplate string Template

Public Methods

Method Description
generate ( ) : string Remove name attributes in the back end so the form is not validated

Protected Methods

Method Description
compile ( ) : string Generate the form
getMaxFileSize ( ) : integer Get the maximum file size that is allowed for file uploads
initializeSession ( string $formId ) Initialize the form in the current session
processFormData ( array $arrSubmitted, array $arrLabels, array $arrFields ) Process form data, store it in the session and redirect to the jumpTo page

Method Details

compile() protected method

Generate the form
protected compile ( ) : string
return string

generate() public method

Remove name attributes in the back end so the form is not validated
public generate ( ) : string
return string

getMaxFileSize() protected method

Get the maximum file size that is allowed for file uploads
Deprecation: Deprecated since Contao 4.0, to be removed in Contao 5.0. Use $this->objModel->getMaxUploadFileSize() instead.
protected getMaxFileSize ( ) : integer
return integer

initializeSession() protected method

Initialize the form in the current session
protected initializeSession ( string $formId )
$formId string

processFormData() protected method

Process form data, store it in the session and redirect to the jumpTo page
protected processFormData ( array $arrSubmitted, array $arrLabels, array $arrFields )
$arrSubmitted array
$arrLabels array
$arrFields array

Property Details

$arrFormUsages protected_oe static_oe property

Form usages during same request
protected static array $arrFormUsages
return array

$objModel protected_oe property

Model
protected FormModel,contao $objModel
return FormModel

$strKey protected_oe property

Key
protected string $strKey
return string

$strTable protected_oe property

Table
protected string $strTable
return string

$strTemplate protected_oe property

Template
protected string $strTemplate
return string