<?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 Web AppBuilder Widget Configuration Validation in ArcGIS Web AppBuilder Questions</title>
    <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348010#M9238</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;I have created a custom widget with configuration in web appbuilder. What I need to do is disable "Ok" button or do nothing if all fields in the config screen are not filled. In other words, I need to do save only when all inputs are filled. Any idea how to achieve it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Jamil&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 14 Nov 2015 20:53:27 GMT</pubDate>
    <dc:creator>JamilNawaz</dc:creator>
    <dc:date>2015-11-14T20:53:27Z</dc:date>
    <item>
      <title>Web AppBuilder Widget Configuration Validation</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348010#M9238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;I have created a custom widget with configuration in web appbuilder. What I need to do is disable "Ok" button or do nothing if all fields in the config screen are not filled. In other words, I need to do save only when all inputs are filled. Any idea how to achieve it?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #222222; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 15px; background-color: rgba(248, 248, 248, 0.6);"&gt;Jamil&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Nov 2015 20:53:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348010#M9238</guid>
      <dc:creator>JamilNawaz</dc:creator>
      <dc:date>2015-11-14T20:53:27Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Widget Configuration Validation</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348011#M9239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jamil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Simple as&lt;/P&gt;&lt;PRE __default_attr="javascript" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14475394767376163" data-renderedposition="71_8_912_16" jivemacro_uid="_14475394767376163"&gt;&lt;P&gt;this.popup.disableButton(0);&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 14 Nov 2015 22:17:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348011#M9239</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-11-14T22:17:55Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Widget Configuration Validation</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348012#M9240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where to write that? I write on Settings.js postCreate method, but there is no "this.popup".&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 05:30:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348012#M9240</guid>
      <dc:creator>JamilNawaz</dc:creator>
      <dc:date>2015-11-15T05:30:18Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Widget Configuration Validation</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348013#M9241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am doing like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt; return declare([BaseWidget], {&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; baseClass: 'jimu-widget-MyWidget-setting',&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; postCreate: function () {&lt;/P&gt;&lt;P&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;&amp;nbsp; this.inherited(arguments);&lt;/P&gt;&lt;P&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;&amp;nbsp; this.popup.disableButton(0);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; },&lt;/P&gt;&lt;P&gt;});&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jamil&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 05:39:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348013#M9241</guid>
      <dc:creator>JamilNawaz</dc:creator>
      <dc:date>2015-11-15T05:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Widget Configuration Validation</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348014#M9242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Jamil,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; OK Sorry, they do not provide access to disable the main widget settings button like that. You can use the code I provided for an subsequent/additional popups.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 15 Nov 2015 21:07:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348014#M9242</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2015-11-15T21:07:24Z</dc:date>
    </item>
    <item>
      <title>Re: Web AppBuilder Widget Configuration Validation</title>
      <link>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348015#M9243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'll provide my solution, even though this is an old post, since it's a top Google result.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;As far as I know, you cannot disable the OK button, but there is a way to prevent users from moving forward if they don't meet your validation test.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When you click OK on the widget settings page, the getConfig() method is fired. If we return false on this method, the user will not be able to close the settings page. Therefore, we can add a validation method and return false if some criteria is not met - with a popup indicating what the user omitted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;getConfig&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;   
  &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;!&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;yourValidationMethod &lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;      
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;   
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt;  

yourValidationMethod&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;function&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;  
  &lt;SPAN class="keyword token"&gt;if&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lang&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;trim&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;this&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;someInput&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;get&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'value'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="operator token"&gt;===&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;''&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;     
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;false&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;   
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;else&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;      
    &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;true&lt;/SPAN&gt;    
  &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt; 
&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 16:23:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-web-appbuilder-questions/web-appbuilder-widget-configuration-validation/m-p/348015#M9243</guid>
      <dc:creator>MarkBuie1</dc:creator>
      <dc:date>2021-12-11T16:23:09Z</dc:date>
    </item>
  </channel>
</rss>

