Form

Wraps forms

Form

Container for form

The form container allows you to build forms.

error_outline
<!-- form.blade.php -->
<form id="62bece48624f4" class="c-form" data-uid="62bece48624f1" method="POST" action="?q=form_component">
    <!-- field.blade.php -->
<div class="c-field c-field--text c-field--md c-field--radius-md c-field--md c-field--radius-md" id="62bece48623d6">
            <label class="c-field__label" for="input_62bece48623d6" id="label_62bece48623d6">
            Enter text
                    </label>
        
    <div class="c-field__inner c-field__inner--text">
                                
            <input id="input_62bece48623d6"
                type="text"
                value=""
                type="text" name="text" aria-labelledby="label_62bece48623d6" data-uid="62bece48623ec"
                                placeholder=""
            />

                        
            <i class="c-icon c-field__suffix material-icons c-field__error-icon" translate="no" role="img">error_outline</i>
            </div>
    </div>

    <button id="62bece4862486" class="c-button c-button__filled c-button__filled--primary c-button--md" href="" target="_top" js-toggle-trigger="" js-toggle-item="" type="basic" aria-pressed="false" data-uid="62bece4862481">   
    <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',
        'attributeList' => [
            '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
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.
Settings location: /mnt/persist/www/docroot_styleguide_v2/source/library/source/php/Component/Form/form.json