Methods

__construct()

__construct(string $Action, string $Method, int $FormType, $ErrorMessage, $SucessMessage, array $Attribs) 

Parameters

$Action

string

$Method

string

$FormType

int

$ErrorMessage

$SucessMessage

$Attribs

array

__toString()

__toString() : string

Returns

string

addFieldWithLabel()

addFieldWithLabel($Field, $LabelText, $HelpText) 

Parameters

$Field

$LabelText

$HelpText

addPreviousContent()

addPreviousContent($Content) 

Parameters

$Content

addSubmitButton()

addSubmitButton($submitText, $Attribs) 

Parameters

$submitText

$Attribs

group()

group($FormElement, $Label) : \PHPStrap\Form\Form
fluent This method is part of a fluent interface and will return the same instance

Parameters

$FormElement

$Label

Returns

\PHPStrap\Form\Form

groupRow()

groupRow($FormElements, $Styles) : \PHPStrap\Form\Form
fluent This method is part of a fluent interface and will return the same instance

Parameters

$FormElements

$Styles

Returns

\PHPStrap\Form\Form

Defines hidden inputs within the form Can accept a single array to create one input or a multidimensional array to create many inputs

hidden(mixed $Inputs) : \PHPStrap\Form\Form

Parameters

$Inputs

array An array of arrays or an associative array that sets the inputs attributes

Returns

isValid()

isValid() : boolean | NULL

Returns

booleanNULL

setErrorMessage()

setErrorMessage($ErrorMessage) 

Parameters

$ErrorMessage

setGlobalValidations()

setGlobalValidations($Validations) 

Parameters

$Validations

setId()

setId($id) 

Parameters

$id

setSucessMessage()

setSucessMessage($SucessMessage) 

Parameters

$SucessMessage

setWidths()

setWidths($LabelWidth, $InputWidth) 

Parameters

$LabelWidth

$InputWidth

submitedValues()

submitedValues($namePrefix) 

Parameters

$namePrefix

addFormElement()

addFormElement($obj) 

Parameters

$obj

errorLabel()

errorLabel($FormElement) 

Parameters

$FormElement

fieldErrors()

fieldErrors() 

formGroup()

formGroup($FormElement, $Label, $extraStyles) 

Parameters

$FormElement

$Label

$extraStyles

globalErrors()

globalErrors() 

horizontalStyles()

horizontalStyles($FormElement, $Label) 

Parameters

$FormElement

$Label

label()

label($Text, $Attribs, $ScreenReaderOnly) 

Parameters

$Text

$Attribs

$ScreenReaderOnly

startsWith()

startsWith($haystack, $needle) 
Static

Parameters

$haystack

$needle

 Properties

 

$Action

$Action 
 

$Elements

$Elements 
 

$ErrorMessage

$ErrorMessage 
 

$FormType

$FormType 
 

$InputWidth

$InputWidth 
 

$LabelWidth

$LabelWidth 
 

$Method

$Method 
 

$SucessMessage

$SucessMessage 
 

$previous_contents

$previous_contents 
 

$validForm

$validForm