Your IP : 216.73.216.43


Current Path : /home/rtorresani/www/app/code/Torresani/Consent/view/frontend/web/js/view/
Upload File :
Current File : //home/rtorresani/www/app/code/Torresani/Consent/view/frontend/web/js/view/custom-checkout-form.js

/*global define*/
define([
    'Magento_Ui/js/form/form'
], function(Component) {
    'use strict';
    return Component.extend({
        initialize: function () {
            this._super();
            return this;
        },

        /**
         * Form submit handler
         *
         * This method can have any name.
         */
        onSubmit: function() {
            this.source.set('params.invalid', false);
            this.source.trigger('customCheckoutForm.data.validate');

            // verify that form data is valid
            if (!this.source.get('params.invalid')) {
                // data is retrieved from data provider by value of the customScope property
                var formData = this.source.get('customCheckoutForm');
                // do something with form data
 //               console.dir(formData);
            }
        }
    });
});