Skip to content
This repository was archived by the owner on Dec 29, 2021. It is now read-only.

Form InputField

Luca Longo edited this page Aug 10, 2020 · 8 revisions

It's the class input field, <input type="text" />.

Properties

Inherit all properties from Field

name type default value description
id ?string null Field ID (autogenerated if empty)
name ?string null Field name
label ?string null Label visible on the form
errorBag ?string null Error field returned from the bag
disabled bool false Determs if the field is disable (or not)
readOnly bool false Determs if the field is read-only (or not)
value mixed null Field value
placeholder ?string null Field placeholder

Usage

<x-bc-form:input-field label="Input field" error-bag="inputField" :value="'My value'" />

or, if you use Laravel Livewire:

<x-bc-form:input-field label="Input field" error-bag="inputField" wire:model.lazy="inputField" />

Scopes

  • prepend
  • append

Example:

<x-bc-form:input-field>
    <x-slot name="prepend">Prepend</x-slot>
    <x-slot name="append">Append</x-slot>
</x-bc-form:input-field>

Clone this wiki locally