AnsweredAssumed Answered

Query Widget set default CbxDrawGraphic.checked

Question asked by northcowdon on Aug 11, 2015
Latest reply on Aug 11, 2015 by northcowdon

Hi, I am trying to set up the Web App Builder Query Widget to have some parameters set by default. I managed to set the "use spatial filter to limit features" checkbox button to be on by default and call the appropriate function associated with it so that the radio button options for spatial limit "current map enxtent" and "user defined" radio buttons show up. I would like the radio button CbxDrawGraphic "Only features touching the user-defined area" radio button to be selected by default but i am having no luck with: this.CbxDrawGraphic.checked = true;

 

[Developer App Folder]\10\widgets\Query\Widget.js

      _resetQueryParamsPage: function(){
        this.paramsDijit.clear();
        this.cbxOperational.checked = false;
        this.cbxUseSpatial.checked = true;  //changed from false to true to check on "use spatial filter to limit results"
        this._onCbxUseSpatialClicked(); //function call for the clicking of "use spatial filter to limit results"
        //this.CbxDrawGraphic.checked = true; //THIS CODE DOES NOT ACTUALLY CHECK RADIO BUTTON
        //this._onCbxDrawGraphicClicked(); //CALL ONCE THE ABOVE CODE SELECTS RADIO BUTTON
        this._resetDrawBox();
      },

 

Original Code:

      _resetQueryParamsPage: function(){
        this.paramsDijit.clear();
        this.cbxOperational.checked = false;
        this.cbxUseSpatial.checked = false;
        this._onCbxUseSpatialClicked();
        this._resetDrawBox();
      },

 

I would like this to be the default state....

query.PNG

 

Thanks,

 

Don

Outcomes