-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
I am using a web interface with a checkbox. If I open the website (config portal), configure and save the settings, everything is fine.
However, if I do not save the settings or do not open the config portal at all (timeout), the values from the checkboxes are always set to true.
Textbox or numeric box always work fine
Does anyone have any advice?
`
//PORTAL CONFIG
char time24hoursCheckbox[30] = "type='checkbox'";
if(mode24hour) strcat(time24hoursCheckbox, " checked");
WiFiManagerParameter config_cfg_mode1224("config_cfg_mode1224", "Mode 24 hours
", "T", 2, time24hoursCheckbox, WFM_LABEL_AFTER);
wm.addParameter(&config_cfg_mode1224);
//PoRTAL START
wm.setConfigPortalTimeout(60);
wm.setConfigPortalBlocking(true);
wm.startConfigPortal("ClockCfgPortal");
//GET DATA FROM PORTAL
mode24hour = (strncmp(config_cfg_mode1224.getValue(), "T", 1) == 0);
`