Only if you submit the form with Ajax
You will then be left with a form full of data, but the record written to the database.
Hello, I have a very simple form -
<form method="POST" action="check-imc">
<div class="form-group">
<label for="peso">Peso (Kg) : </label>
<input type="text" name="peso" class="form-control"/>
<label for="altura">Altura (m) : </label>
<input type="text" name="altura" class="form-control"/>
<br />
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<input type="submit" value="Enviar" class="btn btn-primary pull-right"/>
</div>
</form>
And i have a post route like -
Route::post('check-imc', 'ImcController@store')
In which there is store function, which stores the data.
I do not want to redirect/refresh after i click the submit button. Is that possible? Thanks!
Please or to participate in this conversation.