Closed pieinn closed 6 years ago
To clear the inputs after the form has been successfully submitted, you can simply add the prop clear
with the value true
to your AjaxFormComponent
:
<ajax-form method="post" action="path/to/server" :clear=true>
...
</ajax-form>
To show a success alert message after the request was processed by the server, the server should return a json response like the following:
return response()->json([
'alert' => [
'title' => 'Success',
'message' => 'The request was successful!'
]
]);
You can view the full list of json params for the response here. I will make a better documentation within the next days!
Thank you very much! Please provide with some samples
Sorry for disturb again, Please advice how to show Success Alert and clear inputs.
All inputs not cleared when submit form
My Controller : return redirect()->back()->withInput();
Thank you for awesome package.