Hi,
How to dynamic set vaule on wyswig field when I change status to 'Canceled' in edit view?
I try that but it doesn't work:
Thanks for any help!
Lukas
How to dynamic set vaule on wyswig field when I change status to 'Canceled' in edit view?
I try that but it doesn't work:
PHP Code:
define('custom:quote-dynamic-handler', ['dynamic-handler'], function (Dep) {
return Dep.extend({
init: function () {
this.controlFields();
this.recordView.listenTo(
this.model, 'change:status', this.controlFields.bind(this)
);
},
controlFields: function () {
if (this.model.get('status') === 'Canceled') {
this.model.set('mywyswigfieldname','Lorem ipsum Lorem ipsum');
this.model.save();
this.model.fetch();
}
},
});
});
Lukas