In laravel 5.7 with blade app I need to add button to form which has no form tag, so I add
<div class="form-row p-5">
<div class="col-12 col-sm-6 mb-3 pr-2 pl-2">
</div>
<div class="col-12 col-sm-6 mb-3 mt-1 pl-2 pr-2">
<form id="storage_spaces_export_form" action="" method="POST" >
@csrf
<button type="button" class="btn btn-primary float-right">
<span class="btn-label"><i class="fa fa-plus"></i></span> Export ALL box rooms to csv file
</button>
</form>
</div>
</div>
But nothing is triggered pushing this button, I open source of this page and see 2 forms defintions :
</a>
<form id="logout-form" action="http://local-boxbooking2.com/logout" method="POST" style="display: none;">
<input type="hidden" name="_token" value="7ioKi3WR19G31mKpZSnKMpOzT9WND2wvEapJ5FPr"> </form>
...
<div class="form-row p-5">
<div class="col-12 col-sm-6 mb-3 pr-2 pl-2">
</div>
<div class="col-12 col-sm-6 mb-3 mt-1 pl-2 pr-2">
<form id="storage_spaces_export_form" action="http://local-boxbooking2.com/admin/storage_spaces_export" method="POST" >
<input type="hidden" name="_token" value="7ioKi3WR19G31mKpZSnKMpOzT9WND2wvEapJ5FPr">
<button type="button" class="btn btn-primary float-right">
<span class="btn-label"><i class="fa fa-plus"></i></span> Export ALL box rooms to csv file
</button>
</form>
</div>
</div>
I do not see why the new button does not work and how to fix it ?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire