I have to call and pass value to the js function(showPopup())from the template(when clicking the Verify OTP button). How to achieve this?. But now i am not able to call the js function.
layout file
-
-
- Vendor_module/form/element/phone.html
-
- For delivery questions.
Vendor_module/view/frontend/web/js/view/form/element/phone.js
define([
'Magento_Ui/js/form/form'
], function(Component) {
'use strict';
return Component.extend({
defaults: {
template: 'Vendor_module/form/element/phone',
},
initialize: function () {
this._super();
// component initialization logic
return this;
},
/**
* Form submit handler
*
* This method can have any name.
*/
showPopup: function(){
i need to get my phone number
}
});
});
Vendor_module/view/frontend/web/template/form/element/phone.html