LDAP Account Manager

htmlResponsiveInputField extends htmlInputField
in package

A responsive input field that combines label, input field and help.

Table of Contents

ALIGN_BOTTOM  = 3
align to bottom
ALIGN_CENTER  = 4
align to center
ALIGN_LEFT  = 1
align to left
ALIGN_RIGHT  = 2
align to right
ALIGN_TOP  = 0
align to top
VALIDATE_NUMERIC  = 'numeric'
validation rule to allow only numbers ([0-9]+)
VALIDATE_NUMERIC_WITH_NEGATIVE  = 'numericWithNegative'
validation rule to allow positive/negative numbers ([-]?[0-9]+)
$alignment  : mixed
alignment when inside a table
$colspan  : mixed
colspan if inside a table
$rowspan  : mixed
rowspan if inside a table
$autocomplete  : mixed
enable autocomplete
$autocompleteMinLength  : mixed
autocomplete start at this input length
$autocompleteValues  : mixed
autocompletion suggestions
$autoTrim  : mixed
marks the input field as auto trimmed (remove spaces at start/end)
$calendarFormat  : mixed
calendar format
$calendarFormatWithSeconds  : mixed
calendar with seconds
$calendarFormatWithTime  : mixed
calendar with time
$checkPasswordStrength  : mixed
check password strength
$cssClasses  : mixed
CSS classes
$disableAutoFill  : mixed
disables browser autofilling of password fields
$fieldMaxLength  : mixed
field max length (default 1000)
$fieldName  : mixed
unique field name
$fieldSize  : mixed
field size (default 30)
$fieldValue  : mixed
field value
$id  : mixed
id
$isEnabled  : mixed
enabled or disabled
$isPassword  : mixed
password field
$maxValue  : mixed
maximum value
$minValue  : mixed
minimum value
$obfuscate  : mixed
indicates that the value should be saved in obfuscated form
$onInput  : mixed
oninput event
$onKeyPress  : mixed
on keypress event
$onKeyUp  : mixed
on keyupp event
$required  : mixed
required field
$sameValueFieldID  : mixed
field ID that needs to have same value (e.g. password field)
$showCalendar  : mixed
show calendar
$showDnSelection  : mixed
show DN selection
$tableCellCssClasses  : mixed
table cell CSS classes
$title  : mixed
title attribute
$transient  : mixed
indicates that this field should not automatically be saved in the self service or server profile
$validationRule  : mixed
validation rule
$dataAttributes  : mixed
data attributes
$helpID  : mixed
help ID
$helpModule  : mixed
help module name
$label  : mixed
Descriptive label
$renderParentHtml  : mixed
render HTML of parent class
$shortLabel  : mixed
short label
__construct()  : mixed
Constructor
addDataAttribute()  : mixed
Adds a data attribute.
disableAutoTrim()  : mixed
enableAutocompletion()  : mixed
Enables autocompletion for this input field.
filterSelectBox()  : mixed
Turns this field into a live filter for a select box.
generateHTML()  : array<string|int, mixed>
Prints the HTML code for this element.
getAlignmentString()  : string
Returns the HTML attributes for the alignment.
getColspanString()  : string
Returns the HTML attribute for the colspan.
getCSSClasses()  : array<string|int, mixed>
Returns the CSS classes of this element.
getRowspanString()  : string
Returns the HTML attribute for the rowspan.
getTableCellCSSClasses()  : array<string|int, mixed>
Returns the CSS classes of the surrounding table cell for this element.
setCSSClasses()  : mixed
Adds CSS classes to this element.
setFieldMaxLength()  : mixed
Sets the maximum field length.
setFieldSize()  : mixed
Sets the field size (default is 30).
setId()  : mixed
Sets the element ID.
setIsEnabled()  : mixed
Specifies if this component is enabled and accepts user modification.
setIsPassword()  : mixed
Specifies if this is a password field.
setMinimumAndMaximumNumber()  : mixed
Sets the field as number field with minimum and maximum values.
setObfuscate()  : mixed
Specifies if the value should be saved in obfuscated form (e.g. self service profile).
setOnInput()  : void
Sets the JavaScript for the onInput event.
setOnKeyPress()  : mixed
Sets the JavaScript for the onKeyPress event.
setOnKeyUp()  : mixed
Sets the JavaScript for the onKeyUp event.
setRequired()  : mixed
Specifies if the input field is required.
setSameValueFieldID()  : mixed
Specifies the ID of a second field that must have the same value as this field.
setShortLabel()  : mixed
Use a short label (4 columns instead of 6) for tablet/desktop.
setTableCellCSSClasses()  : mixed
Adds CSS classes to the surrounding table cell for this element.
setTitle()  : mixed
Sets the title for the input field.
setTransient()  : mixed
Specifies that the value should not be automatically saved when used in self service or server profile (default: false).
setValidationRule()  : mixed
Specifies the validation rule (e.g. htmlElement::VALIDATE_NUMERIC) for this field.
showCalendar()  : mixed
Shows a calendar when the field is selected.
showDnSelection()  : mixed
Shows a DN selection next to input field.
getDataAttributesAsString()  : string
Returns the data attributes as rendered string.
isAutoTrim()  : bool
Returns if the field content should be auto-trimmed (remove spaces at start/end).

Constants

ALIGN_BOTTOM

align to bottom

public mixed ALIGN_BOTTOM = 3

ALIGN_CENTER

align to center

public mixed ALIGN_CENTER = 4

ALIGN_LEFT

align to left

public mixed ALIGN_LEFT = 1

ALIGN_RIGHT

align to right

public mixed ALIGN_RIGHT = 2

ALIGN_TOP

align to top

public mixed ALIGN_TOP = 0

VALIDATE_NUMERIC

validation rule to allow only numbers ([0-9]+)

public mixed VALIDATE_NUMERIC = 'numeric'

VALIDATE_NUMERIC_WITH_NEGATIVE

validation rule to allow positive/negative numbers ([-]?[0-9]+)

public mixed VALIDATE_NUMERIC_WITH_NEGATIVE = 'numericWithNegative'

Properties

$alignment

alignment when inside a table

public mixed $alignment = \null

$colspan

colspan if inside a table

public mixed $colspan = \null

$rowspan

rowspan if inside a table

public mixed $rowspan = \null

$autocomplete

enable autocomplete

protected mixed $autocomplete = \false

$autocompleteMinLength

autocomplete start at this input length

protected mixed $autocompleteMinLength = 1

$autocompleteValues

autocompletion suggestions

protected mixed $autocompleteValues = array()

$autoTrim

marks the input field as auto trimmed (remove spaces at start/end)

protected mixed $autoTrim = \true

$calendarFormat

calendar format

protected mixed $calendarFormat = ''

$calendarFormatWithSeconds

calendar with seconds

protected mixed $calendarFormatWithSeconds = \false

$calendarFormatWithTime

calendar with time

protected mixed $calendarFormatWithTime = \false

$checkPasswordStrength

check password strength

protected mixed $checkPasswordStrength = \false

$cssClasses

CSS classes

protected mixed $cssClasses = array()

$disableAutoFill

disables browser autofilling of password fields

protected mixed $disableAutoFill = \false

$fieldMaxLength

field max length (default 1000)

protected mixed $fieldMaxLength = 1000

$fieldName

unique field name

protected mixed $fieldName

$fieldSize

field size (default 30)

protected mixed $fieldSize = 30

$fieldValue

field value

protected mixed $fieldValue = ''

$id

id

protected mixed $id = \null

$isEnabled

enabled or disabled

protected mixed $isEnabled = \true

$isPassword

password field

protected mixed $isPassword = \false

$maxValue

maximum value

protected mixed $maxValue = \null

$minValue

minimum value

protected mixed $minValue = \null

$obfuscate

indicates that the value should be saved in obfuscated form

protected mixed $obfuscate = \false

$onInput

oninput event

protected mixed $onInput = \null

$onKeyPress

on keypress event

protected mixed $onKeyPress = \null

$onKeyUp

on keyupp event

protected mixed $onKeyUp = \null

$required

required field

protected mixed $required = \false

$sameValueFieldID

field ID that needs to have same value (e.g. password field)

protected mixed $sameValueFieldID = \null

$showCalendar

show calendar

protected mixed $showCalendar = \false

$showDnSelection

show DN selection

protected mixed $showDnSelection = \false

$tableCellCssClasses

table cell CSS classes

protected mixed $tableCellCssClasses = array()

$title

title attribute

protected mixed $title = \null

$transient

indicates that this field should not automatically be saved in the self service or server profile

protected mixed $transient = \false

$validationRule

validation rule

protected mixed $validationRule = \null

$dataAttributes

data attributes

private mixed $dataAttributes = array()

$helpID

help ID

private mixed $helpID

$helpModule

help module name

private mixed $helpModule = \null

$label

Descriptive label

private mixed $label

$renderParentHtml

render HTML of parent class

private mixed $renderParentHtml = \false

$shortLabel

short label

private mixed $shortLabel = \false

Methods

__construct()

Constructor

public __construct(string $label, string $fieldName[, string $fieldValue = null ][, string|array<string|int, mixed> $helpID = null ][, bool $required = false ]) : mixed
Parameters
$label : string

descriptive label

$fieldName : string

unique field name

$fieldValue : string = null

value of input field (optional)

$helpID : string|array<string|int, mixed> = null

help ID or array of help ID + module name (optional)

$required : bool = false

field is required

Return values
mixed

addDataAttribute()

Adds a data attribute.

public addDataAttribute(string $key, string $value) : mixed
Parameters
$key : string

attribute name (without "data-")

$value : string

attribute value

Return values
mixed

disableAutoTrim()

public disableAutoTrim() : mixed
Return values
mixed

enableAutocompletion()

Enables autocompletion for this input field.

public enableAutocompletion(array<string|int, mixed> $values[, int $minLength = 1 ]) : mixed
Parameters
$values : array<string|int, mixed>

list of values to suggest

$minLength : int = 1

autocompletion starts after this number of characters entered (default 1; 0 means immediate start)

Return values
mixed

filterSelectBox()

Turns this field into a live filter for a select box.

public filterSelectBox(string $name) : mixed

Cannot be used together with setOnKeyUp().

Parameters
$name : string

select box name

Return values
mixed

generateHTML()

Prints the HTML code for this element.

public generateHTML(mixed $module, mixed $input, mixed $values, mixed $restricted, mixed &$tabindex, mixed $scope) : array<string|int, mixed>
Parameters
$module : mixed

Name of account module

$input : mixed

List of meta-HTML elements

$values : mixed

List of values which override the defaults in $input (name => value)

$restricted : mixed

If true then no buttons will be displayed

$tabindex : mixed

Start value of tabulator index for input fields

$scope : mixed

Account type

Tags
see
htmlInputField::generateHTML()
Return values
array<string|int, mixed>

List of input field names and their type (name => type)

getAlignmentString()

Returns the HTML attributes for the alignment.

public getAlignmentString() : string
Return values
string

alignment HTML attributes (e.g. align="right" valign="top")

getColspanString()

Returns the HTML attribute for the colspan.

public getColspanString() : string
Return values
string

colspan HTML attribute (e.g. colspan=3)

getCSSClasses()

Returns the CSS classes of this element.

public getCSSClasses() : array<string|int, mixed>
Return values
array<string|int, mixed>

$classes CSS class names

getRowspanString()

Returns the HTML attribute for the rowspan.

public getRowspanString() : string
Return values
string

rowspan HTML attribute (e.g. rowspan=3)

getTableCellCSSClasses()

Returns the CSS classes of the surrounding table cell for this element.

public getTableCellCSSClasses() : array<string|int, mixed>
Return values
array<string|int, mixed>

CSS classes

setCSSClasses()

Adds CSS classes to this element.

public setCSSClasses(array<string|int, mixed> $classes) : mixed
Parameters
$classes : array<string|int, mixed>

CSS class names

Return values
mixed

setFieldMaxLength()

Sets the maximum field length.

public setFieldMaxLength(int $fieldMaxLength) : mixed
Parameters
$fieldMaxLength : int

length

Return values
mixed

setFieldSize()

Sets the field size (default is 30).

public setFieldSize(int $fieldSize) : mixed
Parameters
$fieldSize : int

size

Return values
mixed

setId()

Sets the element ID.

public setId(string $id) : mixed
Parameters
$id : string

id

Return values
mixed

setIsEnabled()

Specifies if this component is enabled and accepts user modification.

public setIsEnabled(bool $isEnabled) : mixed
Parameters
$isEnabled : bool

enabled if true

Return values
mixed

setIsPassword()

Specifies if this is a password field.

public setIsPassword(bool $isPassword[, bool $checkStrength = false ][, bool $disableAutoFill = false ]) : mixed
Parameters
$isPassword : bool

password field

$checkStrength : bool = false

check if matches password policy (default: false)

$disableAutoFill : bool = false

prevent autofilling by browser

Return values
mixed

setMinimumAndMaximumNumber()

Sets the field as number field with minimum and maximum values.

public setMinimumAndMaximumNumber(int $minimum[, int $maximum = null ]) : mixed
Parameters
$minimum : int

minimum

$maximum : int = null

maximum

Return values
mixed

setObfuscate()

Specifies if the value should be saved in obfuscated form (e.g. self service profile).

public setObfuscate(bool $obfuscate) : mixed
Parameters
$obfuscate : bool

obfuscate value

Return values
mixed

setOnInput()

Sets the JavaScript for the onInput event.

public setOnInput(string $onInput) : void
Parameters
$onInput : string

JavaScript code

Return values
void

setOnKeyPress()

Sets the JavaScript for the onKeyPress event.

public setOnKeyPress(string $onKeyPress) : mixed
Parameters
$onKeyPress : string

JavaScript code

Return values
mixed

setOnKeyUp()

Sets the JavaScript for the onKeyUp event.

public setOnKeyUp(string $onKeyUp) : mixed
Parameters
$onKeyUp : string

JavaScript code

Return values
mixed

setRequired()

Specifies if the input field is required.

public setRequired(bool $required) : mixed
Parameters
$required : bool

required

Return values
mixed

setSameValueFieldID()

Specifies the ID of a second field that must have the same value as this field.

public setSameValueFieldID(string $sameValueFieldID) : mixed

This field is marked red if different or green if equal.

Parameters
$sameValueFieldID : string

ID of reference field

Return values
mixed

setShortLabel()

Use a short label (4 columns instead of 6) for tablet/desktop.

public setShortLabel() : mixed
Return values
mixed

setTableCellCSSClasses()

Adds CSS classes to the surrounding table cell for this element.

public setTableCellCSSClasses(array<string|int, mixed> $classes) : mixed
Parameters
$classes : array<string|int, mixed>

CSS class names

Return values
mixed

setTitle()

Sets the title for the input field.

public setTitle(string $title) : mixed
Parameters
$title : string

title value

Return values
mixed

setTransient()

Specifies that the value should not be automatically saved when used in self service or server profile (default: false).

public setTransient(bool $transient) : mixed
Parameters
$transient : bool

transient field

Return values
mixed

setValidationRule()

Specifies the validation rule (e.g. htmlElement::VALIDATE_NUMERIC) for this field.

public setValidationRule(bool $rule) : mixed

This rule is checked on client side when the input field looses focus.

Parameters
$rule : bool

rule name

Return values
mixed

showCalendar()

Shows a calendar when the field is selected.

public showCalendar(string $format[, bool $withTime = false ][, bool $withSeconds = false ]) : mixed
Parameters
$format : string

calendar format (e.g. Y-m-d)

$withTime : bool = false

activate time selection

$withSeconds : bool = false

show seconds

Return values
mixed

showDnSelection()

Shows a DN selection next to input field.

public showDnSelection() : mixed
Return values
mixed

getDataAttributesAsString()

Returns the data attributes as rendered string.

protected getDataAttributesAsString() : string
Return values
string

data attributes

isAutoTrim()

Returns if the field content should be auto-trimmed (remove spaces at start/end).

protected isAutoTrim() : bool
Return values
bool

auto-trim input

Search results