mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 00:55:52 +03:00
[GH-ISSUE #1294] [QUESTION] Make inputs mandatory on config page- Custom HTML #1110
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#1110
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @shariq-azim on GitHub (Sep 19, 2021).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1294
Hardware
WiFimanager Branch/Release: Master
Esp8266/Esp32: Esp32
Hardware: Esp32
Core Version: 2.4.0, staging
Description
Hello All,
This is a question not an issue.
Is there a way to make the fields mandatory during configurations, such that users do not just click on save without giving information on wifi ssid, password and custom parameters.

Currently, one can even save the credentials or custom param values without any real values. a mandatory check should prevent the same.
Better if the check icon can also be shown like the reference image
Please suggest.
@shariq-azim commented on GitHub (Sep 20, 2021):
Hello,
I have realised a js script like this should be helpful here:
"";
So , i used one of the examples from advanced folder and added the code (snippet):
wm.addParameter(&custom_mqtt_server);
wm.addParameter(&custom_mqtt_port);
String html_script = "";
new (&custom_field) WiFiManagerParameter(html_script.c_str()); // custom html input
wm.addParameter(&custom_field);
if (!wm.autoConnect("AutoConnectAP")) {
Serial.println("failed to connect and hit timeout");
delay(3000);
//reset and try again, or maybe put it to deep sleep
//ESP.restart();
//delay(5000);
}
And it worked!!
Thanks for reading