I want a text box in my modal widget in custom js file and get the value of that text box on button click of that modal.

], function($){
            autoOpen: true,
            responsive: true,
            clickableOverlay: false,
            modalClass: 'modal-custom',
            title: 'test',

            // here I want textbox

            buttons: [{
                text: $.mage.__('Return'),
                class: 'return_btn',
                click: function () {

                     //get the value of textbox in variable




Is there another property for textbox like button which can be used here?

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.