<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How can I detect Editor widget combo box change? in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-detect-editor-widget-combo-box-change/m-p/687830#M18193</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm modifying the editor widget to create a cascading select but I'm having a very difficult time finding out where the attribute html elements get created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tracked down where the editing starts in Widget.js (_startEditingSession) under attributeInspector.onAttributeChange but that doesn't exactly do what I want.&amp;nbsp; I would like to have an attribute that must be set to 'Yes' in order for a user to save.&amp;nbsp; I tried using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(attributeInspector.params.layerInfos[0].fieldInfos[5].dijit.displayedValue&amp;nbsp;==&amp;nbsp;'Yes'){&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query(".atiButton.save-button").removeClass("disable");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query(".atiButton.save-button").addClass("disable");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but I found that if I changed yes to no and no to yes it would not disable and enable correctly.&amp;nbsp; Since only the displayValue changes and not the actual value the onAttributeChange wouldn't run.&amp;nbsp; I sometimes had to change another attribute to run what I wanted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought attaching a listener directly to the combobox would let me detect displayvalue change.&amp;nbsp; I tried to query the object by widgetid but found that it changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 11 Nov 2019 14:02:46 GMT</pubDate>
    <dc:creator>MichaelMitchell5</dc:creator>
    <dc:date>2019-11-11T14:02:46Z</dc:date>
    <item>
      <title>How can I detect Editor widget combo box change?</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-detect-editor-widget-combo-box-change/m-p/687830#M18193</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm modifying the editor widget to create a cascading select but I'm having a very difficult time finding out where the attribute html elements get created.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tracked down where the editing starts in Widget.js (_startEditingSession) under attributeInspector.onAttributeChange but that doesn't exactly do what I want.&amp;nbsp; I would like to have an attribute that must be set to 'Yes' in order for a user to save.&amp;nbsp; I tried using&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;if(attributeInspector.params.layerInfos[0].fieldInfos[5].dijit.displayedValue&amp;nbsp;==&amp;nbsp;'Yes'){&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query(".atiButton.save-button").removeClass("disable");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&amp;nbsp;else{&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;query(".atiButton.save-button").addClass("disable");&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;/DIV&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;but I found that if I changed yes to no and no to yes it would not disable and enable correctly.&amp;nbsp; Since only the displayValue changes and not the actual value the onAttributeChange wouldn't run.&amp;nbsp; I sometimes had to change another attribute to run what I wanted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought attaching a listener directly to the combobox would let me detect displayvalue change.&amp;nbsp; I tried to query the object by widgetid but found that it changes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 11 Nov 2019 14:02:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/how-can-i-detect-editor-widget-combo-box-change/m-p/687830#M18193</guid>
      <dc:creator>MichaelMitchell5</dc:creator>
      <dc:date>2019-11-11T14:02:46Z</dc:date>
    </item>
  </channel>
</rss>

