How can i set a default attribute value to the field of SmartEditor widget as shown on picture
Solved! Go to Solution.
question solved, I put my stuff to onOpne function of widget
onOpen: function () { if (this._userHasPrivilege === true) { //this.fetchDataByName('GroupFilter'); this._workBeforeCreate(); this.widgetManager.activateWidget(this); } if (this.templatePicker) { this.templatePicker.update(); } setTimeout(function () { var query = document.getElementById("dijit_form_ValidationTextBox_0"); query.setAttribute('value', '{00000000-0000-0000-0000-000000000000}') }, 300); },
I have tried such
_setPresetValue: function () { var sw = registry.byId("savePresetValueSwitch"); this._usePresetValues = sw.checked; query('#dijit_form_ValidationTextBox_0').forEach(function(node){ setTimeout(function(){ var widget = registry.byNode(node.children[0]); widget.set('value', 1); }, 300); },
but i received an error
Can you share a screenshot of the error?
question solved, I put my stuff to onOpne function of widget
onOpen: function () { if (this._userHasPrivilege === true) { //this.fetchDataByName('GroupFilter'); this._workBeforeCreate(); this.widgetManager.activateWidget(this); } if (this.templatePicker) { this.templatePicker.update(); } setTimeout(function () { var query = document.getElementById("dijit_form_ValidationTextBox_0"); query.setAttribute('value', '{00000000-0000-0000-0000-000000000000}') }, 300); },