Is it possible to make agreements fields on checkout billing screen not required? They are added from Stores -> Terms and Conditions in admin panel.
If it is not need then disable agreement
Thanks for reply.
I need agreements but some of them I need to make not required. It is possible to display field and turn off validation for that?
I found template which is responsible for rendering these fields (Magento_CheckoutAgreements/checkout/checkout-agreements) and some code like this:
<!-- ko ifnot: ($parent.isAgreementRequired($data)) -->
<div class="checkout-agreement">
<button type="button" class="action action-show"
data-bind="click: function(data, event) { return $parent.showContent(data, event) }">
<span data-bind="html: checkboxText"></span>
</button>
</div>
<!-- /ko -->
But i can’t find place where to set requirement option for field
Magento 2 also doing server side validation
File location is :
Magento\CheckoutAgreements\Model\Checkout\Plugin
Hello,
Also check below file:
It is resonsible for js validaton, you need to remove required class from below phtml file
Magento\CheckoutAgreements\view\frontend\templates\additional_agreements.phtml