有一个表单,该表单中有两个提交按钮。只有一个正在工作,而按其他则可以刷新页面。为什么有人刷新而不是提交的任何线索?
我的Blade代码:
<button type="button" class="btn btn-primary btn-sm disabled-btn" title="Generate PO & View" onclick="generatePoModel()">Generate PO & View </button>
<!-- <button type="submit" name="approve" value="approve" class="btn btn-primary btn-sm disabled-btn" title="Generate PO & Send" data-toggle="modal" data-target="#emailModal" id="generatePo">Generate PO & Send </button>-->
<button type="submit" name="approve" value="approved" class="btn btn-primary btn-sm disabled-btn" title="Generate PO & Send">Generate PO & Send </button>
@if($update_purchase_requisition_approval_data['purchase_approval_status'] != 'onhold')
<button type="submit" name="approve" value="onhold"
class="btn btn-primary btn-sm disabled-btn"
title="Hold On Order">On Hold </button>
@endif
@if(App\Helpers\DesignationPermissionCheck::isPermitted('purchase-requisition-approval.delete') &&$update_purchase_requisition_approval_data['purchase_approval_status']
== 'pending')
<button type="submit" name="pending" id="delete" value="{{ $id }}"
class="btn btn-primary btn-sm disabled-btn"
title="Hold On Order">Delete</button>
@endif
<a href="<?= route('purchase-requisition-approval.index')?>"
class="btn btn-default btn-sm" title="Back to users Page">Cancel</a>
</div>
答案 0 :(得分:0)
要提交的频道按钮类型
<button type="submit" class="btn btn-primary btn-sm disabled-btn" title="Generate PO & View" onclick="generatePoModel()">Generate PO & View </button>
<!-- <button type="submit" name="approve" value="approve" class="btn btn-primary btn-sm disabled-btn" title="Generate PO & Send" data-toggle="modal" data-target="#emailModal" id="generatePo">Generate PO & Send </button>-->
<button type="submit" name="approve" value="approved" class="btn btn-primary btn-sm disabled-btn" title="Generate PO & Send">Generate PO & Send </button>