因此,我正在尝试禁用“提交”按钮,直到选择了礼品券为止。我该怎么办?这是一些上下文的代码段。我正在使用PHP Symfony 2.8。因此,这是我项目中的.twig文件。
<div class="grid_7 alpha omega data-field" style="width:260px;">
<div class="grid_3 alpha omega">Amount</div>
<div class="grid_4 alpha omega">
<select class="claim" name="gc-claim-voucher" style="width:145px;">
<option value="" <%= !claim.voucher || claim.voucher == "" || claim.voucher == "undefined" ? 'selected="selected"' : '' %> >None</option>
<option value="GC_AMAZON_100" <%= claim.voucher && claim.voucher == "GC_AMAZON_100" ? 'selected="selected"' : '' %> >100</option>
<option value="GC_AMAZON_50" <%= claim.voucher && claim.voucher == "GC_AMAZON_50" ? 'selected="selected"' : '' %> >50</option>
</select>
</div>
</div>
</div>
<% }) %>
<a href="javascript: void 0;" class="send-voucher link">Submit</a>
<a class="button small voucher-communication-logs">Voucher Communication Logs</a>
<% } else { %>
<div class="detail-body grid_7 alpha omega">
<a href="javascript: void 0;" class="add-claim link">+ Add new claim</a>
</div>
<% } %>
</div>
</div>