Disable/enable button

I’m not sure I fully understand. Please send a simple code example to reproduce the issue. It can be independent form your WiFi GUI just with 1-2 buttons (only the most required things)