2

On the checkout page in Magento 2

After search data by finder code, it auto fill customers data.
But when I click the "Next" button. It will show "This is a required field."

In this post https://stackoverflow.com/questions/13632599/knockout-valueupdate-on-change-from-javascript-code

var elem = document.getElementById("input");
 elem.value = "new value";
 ko.utils.triggerEvent(elem, "change");

For example my code

jQuery('input[name="firstname"]').val("Cara");

I want to know about "ko.utils.triggerEvent" by jQuery not element

  • If you are working with data/content managed via KO why are you trying to change it with jQuery? – Ben Crook Sep 25 at 13:25
  • @BenCrook , I new for programming. i want fill data for input by search findercode. but after i set value for input and click next button . It will show "This is a required field." Can you suggest about this for me? Thanks. – Kudo Yukiko Sep 26 at 2:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.