Form
Wraps forms
Form
Container for form
<!-- form.blade.php -->
<form class="c-form js-form-validation" id="id_68fb40e35be7d" data-uid="68fb40e35be86" method="POST" action="?q=form_component">
<!-- field.blade.php -->
<div class="c-field c-field--text c-field--md c-field--radius-md" id="id_68fb40e35bc07" data-uid="68fb40e35bc34">
<label class="c-field__label " for="input_id_68fb40e35bc07" id="label_id_68fb40e35bc07">
Enter text
</label>
<div class="c-field__inner c-field__inner--text">
<input id="input_id_68fb40e35bc07" value="" aria-labelledby="label_id_68fb40e35bc07" type="text" name="text" autocomplete="on">
<div class="c-field_focus-styler u-level-top"></div>
<!-- icon.blade.php -->
<span class="c-icon c-field__suffix c-field__error-icon c-icon--error-outline c-icon--material c-icon--material-error_outline material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-md" aria-hidden="false" data-material-symbol="error_outline" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" data-uid="68fb40e35bd6d">
</span>
<!-- icon.blade.php -->
<span class="c-icon c-field__suffix c-field__success-icon c-icon--check-circle-outline c-icon--material c-icon--material-check_circle_outline material-symbols material-symbols-rounded material-symbols-sharp material-symbols-outlined c-icon--size-md" aria-hidden="false" data-material-symbol="check_circle_outline" role="img" data-nosnippet="" translate="no" aria-label="Icon: Undefined" data-uid="68fb40e35bdbe">
</span>
</div>
</div>
<button class="c-button c-button__filled c-button__filled--primary c-button--md" aria-label="Submit" data-uid="68fb40e35be2d">
<span class="c-button__label">
<span class="c-button__label-text ">
Submit
</span>
</span> </button>
</form>
@form([
'method' => 'POST',
'action' => '?q=form_component'
])
@field([
'type' => 'text',
'name' => 'text',
'label' => "Enter text"
])
@endfield
@button([
'text' => 'Submit',
'color' => 'primary',
'type' => 'basic'
])
@endbutton
@endform
Blade component parameters
| Key | Default value | Type | Available values | Description |
| method | POST | string | - | Set to POST by default |
| action | # | string | - | Path to file, set to # by default |
| validation | true | boolean | - | Validation method toggle on off |
| errorMessage | string | - | If filled: Gives a general error message when form is invalid | |
| validateMessage | string | - | If filled: Gives a general success message when form is valid | |
| id | string | - | The DOM id of the component. | |
| classList | [] | array | - | Array containing wrapping classes array |
| attributeList | [] | array | - | Array containing keys and values rendered as attributes |
| containerAware | false | boolean | true/false | Makes the component container aware. Appends modifiers --size--xs/sm/md/lg to the component. |