Select

Select

Select

Methods

Inherited from MultipleOptionsTrait
Inherited from Element
Inherited from Input
Inherited from InputAttributesTrait
Inherited from Element
Inherited from BasicAttributesTrait

selected

Sets the selected element(s) of the select input.

Select::selected( mixed $value ): self

Returns Self: This method can be chained.


placeholder

Adds an initial entry to the select input. Required elements default to ‘Please select.

Select::placeholder( string $value = '' ): self

..’

Returns Self: This method can be chained.


selectAll

Set the selected element(s) to include all available options.

Select::selectAll( ): self

Returns Self: This method can be chained.


selectMultiple

Sets the select input attribute to handle multiple selections.

Select::selectMultiple( boolean $value = true ): self

Returns Self: This method can be chained.


getLabelContext

Add extra help text to multi-select inputs.

Select::getLabelContext( $label ): string

Return Value: string


chainedTo

Provide an ID of another select input to chain the values in this input to the selected element of the first input.

Select::chainedTo( string $id, array $values ): self

Chained values are paired with the options array, and correlate to the available options in the first select input.

Returns Self: This method can be chained.


fromQueryChained

Build an internal options array from an SQL query with required value and name fields

Select::fromQueryChained( \Gibbon\Contracts\Database\Connection $pdo, string $sql, array $data = array(), $chainedToID = false, $groupBy = false ): self

Returns Self: This method can be chained.