MultiSelect
class MultiSelect extends BaseFormField (View source)
Traits
Properties
bool | $renderForBlocks | from RenderForBlocks | |
protected bool | $translated | from IsTranslatable | |
protected Options|null | $options | from HasOptions | |
protected int | $columns | from HasColumns | |
protected int|null | $max | from HasMax | |
protected int|null | $min | from HasMin | |
protected bool | $inline | from Inlineable | |
protected bool | $unpack | from Unpackable | |
protected bool | $border | from HasBorder | |
protected string|null | $placeholder | from HasPlaceholder | |
protected bool | $searchable | ||
protected bool | $pushTags | ||
protected bool | $taggable | ||
protected bool | $addNew | ||
protected string|null | $moduleName | ||
protected string|null | $storeUrl | ||
protected string|null | $endpoint |
Methods
No description
No description
Set the name of the field, if no label is set yet, this method will also update that.
Set the label of the field, you can use twillTrans('') Laravel translatable strings here.
Marks the field as mandatory, however you still need to add validation rules.
No description
In render we dynamically build the constructor arguments.
Makes the field translatable.
List of options to display in the field.
The amount of column to show the option in (when using unpack).
Sets the placeholder of the field.
If the options should be searchable.
No description
No description
No description
No description
No description
No description
Details
RenderForBlocks
renderForBlocks(bool $renderForBlocks = true)
No description
bool
forBlocks()
No description
protected
__construct(string $component, string|null $name = null, string|null $label = null, string|null $note = null, bool|null $required = false, bool|null $disabled = false, mixed $default = null, mixed $connectedTo = null, array $mandatoryProperties = [])
No description
static BaseFormField
make()
No description
BaseFormField
name(string $name)
Set the name of the field, if no label is set yet, this method will also update that.
BaseFormField
default(mixed $default)
No description
BaseFormField
label(string $label)
Set the label of the field, you can use twillTrans('') Laravel translatable strings here.
BaseFormField
note(string $note)
Add a note to the field to display on the form.
BaseFormField
required(bool $required = true)
Marks the field as mandatory, however you still need to add validation rules.
BaseFormField
disabled(bool $disabled = true)
Marks the field as disabled.
There might be some fields not supporting this.
connectedTo(string $fieldName, mixed $fieldValues, array $options = [])
No description
View
render()
No description
protected array
getAdditionalConstructorArguments()
In render we dynamically build the constructor arguments.
In exceptional cases such as browser we have more conditionals and we can use this method to set those.
IsTranslatable
translatable(bool $translatable = true)
Makes the field translatable.
HasOptions
options(Options|Closure|array $options)
List of options to display in the field.
HasOptions
addOption(Option $option)
Adds a single option.
protected Options
getOptions()
No description
in
HasMax at line 12
HasMax
max(int $max)
Sets the max amount of items.
in
HasMin at line 12
HasMin
min(int $min)
Sets the minimum amount of items.
Inlineable
inline(bool $inline = true)
Shows the option inline.
HasColumns
columns(int $columns = 1)
The amount of column to show the option in (when using unpack).
Unpackable
unpack(bool $unpack = true)
Shows the option in a grid.
HasBorder
border(bool $border = true)
Adds a border around the options.
HasPlaceholder
placeholder(string $placeholder)
Sets the placeholder of the field.
MultiSelect
searchable(bool $searchable = true)
If the options should be searchable.
MultiSelect
canAddNew(bool $canAddNew = true)
No description
MultiSelect
moduleName(string $moduleName)
No description
MultiSelect
storeUrl(string $storeUrl)
No description
MultiSelect
taggable(bool $taggable = true)
No description
MultiSelect
pushTags(bool $pushTags = true)
No description
MultiSelect
endpoint(string $endpoint)
No description