Disable or turn widgets off in Web AppBuilder

765
1
03-02-2018 11:28 AM
Status: Open
nspittlemeister_LCFPD
Occasional Contributor

It would be great if there was an option to turn off a widget within the Sidebar Controller in Web AppBuilder. I have widgets that are seasonal and it would be nice to be able to make widgets inactive, so they wouldn't show in the application. Instead, I need to reconfigure the widget each time from scratch when the widget becomes back active. 

Thanks for the consideration.

Nick Spittlemeister

Lake County Forest Preserve District

1 Comment
DavidWendelken

Nick,

An alternative option would be to intercept the widget code when it starts up.  During the off season (which your code would determine at run time), it would alter the config information the widget places in memory after it checks the config file.  

I do something similar with the edit and export widgets, except in reverse, so I know this is possible.  I add data to the config variable in memory to allow exporting and editing of layers added at run time.


Or, just save the config file for that widget when it's blank and when it's filled in.   Replace the file on the server with the version you want when the season changes.   Simpler, but you have to remember to do it, unlike the first suggestion I gave.