Skip to content

BaseField Styling

tanthammar edited this page Sep 27, 2020 · 11 revisions

Default styling is made in the config file

php artisan vendor:publish --tag=form-config

Override configs on individual fields

With these methods you merge OR override the field-attribute values set in the config file.

Input::make('Name')->labelAttr('bg-green-300') //merge with config
Input::make('Name')->labelAttr('bg-green-300', false) //replace config

->inputAttr()

->rootAttr(array $attributes, bool $merge = true)

  • Override field-attribute['root'] in the config file

->beforeAttr(array $attributes, bool $merge = true)

  • Override field-attribute['before'] in the config file

->beforeTextAttr(array $attributes, bool $merge = true)

  • Override field-attribute['before-text'] in the config file

->aboveAttr(array $attributes, bool $merge = true)

  • Override field-attribute['above'] in the config file

->belowAttr(array $attributes, bool $merge = true)

  • Override field-attribute['below'] in the config file

->belowWrapperAttr(array $attributes, bool $merge = true)

  • Override field-attribute['below-wrapper'] in the config file

->afterAttr(array $attributes, bool $merge = true)

  • Override field-attribute['after'] in the config file

->afterTextAttr(array $attributes, bool $merge = true)

  • Override field-attribute['after-text'] in the config file

->labelAttr(array $attributes, bool $merge = true)

  • Override field-attribute['label'] in the config file

->labelSuffixAttr(array $attributes, bool $merge = true)

  • Override field-attribute['label-suffix'] in the config file

->afterLabelAttr(array $attributes, bool $merge = true)

  • Override field-attribute['after-label'] in the config file
Clone this wiki locally