grmcdorman / esp8266_web_settings

General, non-specific web-based settings/status manager and classes for ESP8266 (possibly usable for other Arduino-class boards).
MIT License
1 stars 0 forks source link

Disable/enable input field based on toggle setting #13

Open grmcdorman opened 2 years ago

grmcdorman commented 2 years ago

It should be possible to disable or enable an input field based on the state of a toggle on the same tab.

This could be used, in particular, for a network configuration tab, where there would be a "Use DHCP" toggle and a set of input fields for a static IP address/network mask/gateway. The latter three fields should be disabled if the "Use DHCP" toggle is checked.

This also needs to enable appropriately when the toggle state is updated via a settings load or reload.