Checkbox

Checkbox

Checkbox

Methods

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

__construct

Create a checkpox input with a default value of on when checked.

Checkbox::__construct( string $name )

description

Sets an inline label next to the checkbox input.

Checkbox::description( string $value = '' ): self

Returns Self: This method can be chained.


checked

Set a value or array of values that are currently checked.

Checkbox::checked( string $values ): self

Returns Self: This method can be chained.


checkAll

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

Checkbox::checkAll( ): self

Returns Self: This method can be chained.


addCheckAllNone

Adds a checkall box to the top of the checkbox list, pass a label in otherwise defaults to All / None.

Checkbox::addCheckAllNone( string $label = '' ): self

Returns Self: This method can be chained.


inline

Sets multiple checkbox elements to display horizontally.

Checkbox::inline( boolean $value = true ): self

Returns Self: This method can be chained.


Last updated : September 15, 2018 b92362d