New answers tagged knockoutjs
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....
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 ...
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>&...
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
Top 50 recent answers are included
Related Tags
knockoutjs × 822magento2 × 658
checkout × 192
javascript × 125
uicomponent × 77
magento-2.1 × 64
requirejs × 56
mini-cart × 43
knockout × 43
magento2.3 × 37
template × 36
jquery × 35
html × 32
onepage-checkout × 29
magento2.2 × 25
cart × 21
frontend × 20
magento2.4 × 18
checkout-page × 18
payment-methods × 17
php × 16
layout × 15
ajax × 15
shipping-address × 14
billing-address × 14