laravel-form-components icon indicating copy to clipboard operation
laravel-form-components copied to clipboard

[Feature Request]: Kitchen sink example full form

Open howdu opened this issue 3 years ago • 0 comments

Feature Description

Loving this package thank you :) Just thinking it would be great to see what's possible with this package by default at a glance. E.g such as the grid to stack form groups? Submit button

<form action="{{ route('customer.profile.update') }}" enctype="multipart/form-data" method="post">
    @csrf
    <x-form-group label="Name" name="name">
        <x-input name="name" :value="old('name', $user->name)" required />
    </x-form-group>

    <x-form-group label="Email" name='email'>
        <x-input name="email" type="email" :value="old('email', $user->email)" required />
    </x-form-group>

    <x-form-group label="Phone" name='phone'>
        <x-input name="phone" type="tel" :value="old('phone', $user->phone)" required />
    </x-form-group>

    <div class='lg:grid lg:grid-cols-2 lg:space-x-8'>
        <x-form-group label="Billing Address" name="billing_address_id">
            <x-select name="billing_address_id"
                :value="old('billing_address_id', $user->billing_address_id)" :options="$addresses"
                required>
                <option value=''>Select Address</option>
            </x-select>
        </x-form-group>

        <x-form-group label="Delivery Address" name="delivery_address_id">
            <x-select name="delivery_address_id"
                :value="old('delivery_address_id', $user->delivery_address_id)"
                :options="$addresses" required>
            </x-select>
        </x-form-group>
    </div>

    <x-form-group>
        <x-form.button>Save Details</x-form.button>
    </x-form-group>
</form>

Is this feature valuable for other users as well and why?

No response

howdu avatar Mar 29 '22 10:03 howdu