How can i set a default attribute value to the field of SmartEditor widget as shown on picture
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); },
Can you share a screenshot of the error?
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.