Creates a password field element.

package FormItBuilder

 Methods

FormItBuilder_elementPassword

__construct(string $id, string $label, string $defaultValue) 

Creates a password field.

Parameters

$id

string

The ID of the password field

$label

string

The label of the password field

$defaultValue

string

The default text to be written into the password field

getDateFormat()

getDateFormat() : string
Inherited

Returns the date format used by a field with a date FormRule.

inherited_from \FormItBuilder_elementText::getDateFormat()

Returns

string

getDescription()

getDescription() : string
Inherited

Returns the form elements description.

inherited_from \FormItBuilder_element::getDescription()
inherited_from \FormItBuilder_elementText::getDescription()

Returns

string

getId()

getId() : string
Inherited

Returns the form elements ID.

inherited_from \FormItBuilder_element::getId()
inherited_from \FormItBuilder_elementText::getId()

Returns

string

getLabel()

getLabel() : string
Inherited

Returns the form elements label.

inherited_from \FormItBuilder_element::getLabel()
inherited_from \FormItBuilder_elementText::getLabel()

Returns

string

getMaxLength()

getMaxLength() : int
Inherited

Returns the maximum string length for the field.

inherited_from \FormItBuilder_elementText::getMaxLength()

Returns

int

getMaxValue()

getMaxValue() : int
Inherited

Returns the maximum value for the field.

inherited_from \FormItBuilder_elementText::getMaxValue()

Returns

int

getMinLength()

getMinLength() : int
Inherited

Returns the minimum string length for the field.

inherited_from \FormItBuilder_elementText::getMinLength()

Returns

int

getMinValue()

getMinValue() : int
Inherited

Returns the minimum string length for the field.

inherited_from \FormItBuilder_elementText::getMinValue()

Returns

int

getName()

getName() : string
Inherited

Returns the form elements name.

inherited_from \FormItBuilder_element::getName()
inherited_from \FormItBuilder_elementText::getName()

Returns

string

isRequired($value) / isRequired()

isRequired(boolean $value) : boolean
Inherited

Sets wether the element is required or not.

This setting is generally toggled automatically based on FormRule settings applied in the form.

If no value passed the method will return the current required status.

inherited_from \FormItBuilder_element::isRequired()
inherited_from \FormItBuilder_elementText::isRequired()

Parameters

$value

boolean

If true the field must be filled out.

Returns

boolean

outputHTML()

outputHTML() : string
Inherited

Outputs the HTML for the element.

inherited_from \FormItBuilder_elementText::outputHTML()

Returns

string

setDateFormat($value)

setDateFormat(string $value) 
Inherited

Sets the date format used by a field with a date FormRule. This is generally done automatically via a FormRule.

inherited_from \FormItBuilder_elementText::setDateFormat()

Parameters

$value

string

setDescription($value)

setDescription(string $value) 
Inherited

Allows a sub label (or more descriptive label) to be set within the element label. Could be shown on hover or displayed with main label.

inherited_from \FormItBuilder_element::setDescription()
inherited_from \FormItBuilder_elementText::setDescription()

Parameters

$value

string

setId($value)

setId(string $value) 
Inherited

Sets the form elements ID.

inherited_from \FormItBuilder_element::setId()
inherited_from \FormItBuilder_elementText::setId()

Parameters

$value

string

setLabel($value)

setLabel(string $value) 
Inherited

Sets the form elements label.

inherited_from \FormItBuilder_element::setLabel()
inherited_from \FormItBuilder_elementText::setLabel()

Parameters

$value

string

setMaxLength($value)

setMaxLength(int $value) 
Inherited

Sets the maximum string length for the field. This is generally done automatically via a FormRule.

inherited_from \FormItBuilder_elementText::setMaxLength()

Parameters

$value

int

setMaxValue($value)

setMaxValue(int $value) 
Inherited

Sets the maximum numeric value for a field. This is generally done automatically via a FormRule.

inherited_from \FormItBuilder_elementText::setMaxValue()

Parameters

$value

int

setMinLength($value)

setMinLength(int $value) 
Inherited

Sets the minimum string length for the field. This is generally done automatically via a FormRule.

inherited_from \FormItBuilder_elementText::setMinLength()

Parameters

$value

int

setMinValue($value)

setMinValue(int $value) 
Inherited

Sets the minimum numeric value for a field. This is generally done automatically via a FormRule.

inherited_from \FormItBuilder_elementText::setMinValue()

Parameters

$value

int

setName($value)

setName(string $value) 
Inherited

Sets the form elements name.

inherited_from \FormItBuilder_element::setName()
inherited_from \FormItBuilder_elementText::setName()

Parameters

$value

string

showInEmail($value) / showInEmail()

showInEmail(boolean $value) : boolean
Inherited

Sets wether the element is shown in the email or not.

In some cases fields may be wanted in the form, but not in the email (an example would be fields like a "Confirm Password" field).

If no value passed the method will return the current status.

inherited_from \FormItBuilder_element::showInEmail()
inherited_from \FormItBuilder_elementText::showInEmail()

Parameters

$value

boolean

If true (which is in most cases default) the element will be shown in the email.

Returns

boolean

showLabel($value) / showLabel()

showLabel(boolean $value) : boolean
Inherited

Sets wether the label should be displayed for this element or not. If no value passed the method will return the current status.

inherited_from \FormItBuilder_element::showLabel()
inherited_from \FormItBuilder_elementText::showLabel()

Parameters

$value

boolean

If true (which is in most cases default) a label will be shown next to the form element and in the email.

Returns

boolean