New answers tagged

0 votes

Magento 2 : Validate form fields that are loaded with Knockout on blur-event

document.querySelector('.form.checkout__account').removeAttribute('novalidate'); var yourForm = $('#your-form-id'); yourForm.mage('validation', {}); // Add custom knockout.js validation ko....
Divyarajsinh Barad's user avatar
0 votes

How to set radio buttons in custom payment method as required

You have to added this code into page load event. YOUR_RADIO_BUTTON_NAME: ko.observable().extend({ required: true }), where YOUR_RADIO_BUTTON_NAME replace with your real ...
Dhiren Vasoya's user avatar
0 votes

How to use click event on page load in knockout

Replace button with span and try below way <span class="testprice" data-bind="click: getTestCodeContent"><span data-bind="i18n: 'Add Test Code'"></span>&...
Yogesh's user avatar
  • 563
0 votes

How to use click event on page load in knockout

You can use method call in if statement. But don't forget to make add return true in method. <!-- ko if: isFreeShipping() --> //My Code goes here
Alkos's user avatar
  • 33

Top 50 recent answers are included