Open hemant17 opened 4 years ago
Solution:
$ php artisan vendor:publish --tag=form-views
{{-- resources/views/vendor/laravel-livewire-forms/form.blade.php --}}
<div class="row">
<div class="col-md offset-md-2">
<button class="btn btn-primary" wire:click="saveAndStay">{{ __('Save') }}</button>
<button class="btn btn-primary" wire:click="resetForm">{{ __('Reset') }}</button>
{{-- <button class="btn btn-primary" wire:click="saveAndGoBack">{{ __('Save & Go Back') }}</button> --}}
</div>
</div>
// FormComponent.php
public function resetForm()
{
$this->form_data = [];
}
when users click on save it's should clear the values of input after the summit to DB is that possible?