[GH-ISSUE #1545] How to require user enter value for a parameter via HTML? #1319

Closed
opened 2026-02-28 01:29:34 +03:00 by kerem · 1 comment
Owner

Originally created by @pomplesiegel on GitHub (Jan 10, 2023).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1545

Hello! Great library - really enjoying it!

For our device setup / registration we need the user to enter their email, as shown below. We would like this field to be required, so the user can't press save without entering a value for this space, preferably with some sort of email syntax validation checking (if that's a built in HTML feature).

I was able to configure other aspects of the captive portal page, but couldn't find an easy way to make a parameter entry required by the user (as a HTML change). Is there an easy way to do this through the current API?

Thank you so much!

image
Originally created by @pomplesiegel on GitHub (Jan 10, 2023). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1545 Hello! Great library - really enjoying it! For our device setup / registration we need the user to enter their email, as shown below. We would like this field to be required, so the user can't press save without entering a value for this space, preferably with some sort of email syntax validation checking (if that's a built in HTML feature). I was able to configure other aspects of the captive portal page, but couldn't find an easy way to make a parameter entry required by the user (as a HTML change). Is there an easy way to do this through the current API? Thank you so much! <img width="477" alt="image" src="https://user-images.githubusercontent.com/1450352/211676477-ea5fe400-8fe5-4ae7-a7fb-b03ec3588055.png">
kerem closed this issue 2026-02-28 01:29:34 +03:00
Author
Owner

@pomplesiegel commented on GitHub (Jan 11, 2023):

Nvm, figured it out from other issues (sorry missed this before due to slightly different terms for the same thing).
Issue: https://github.com/tzapu/WiFiManager/issues/736

FYI this was my ultimate solution's syntax:

WiFiManagerParameter("email", "User Email Address", "", 50,"type=\"email\" required");

Changing the type to "email" for minor syntax-checking (ain't perfect, but still something), and the required field so the user can't hit "save" without populating this field.

Thank you!

<!-- gh-comment-id:1379296170 --> @pomplesiegel commented on GitHub (Jan 11, 2023): Nvm, figured it out from other issues (sorry missed this before due to slightly different terms for the same thing). Issue: https://github.com/tzapu/WiFiManager/issues/736 FYI this was my ultimate solution's syntax: ````cpp WiFiManagerParameter("email", "User Email Address", "", 50,"type=\"email\" required"); ```` Changing the type to "email" for minor syntax-checking (ain't perfect, but still something), and the required field so the user can't hit "save" without populating this field. Thank you!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/WiFiManager#1319
No description provided.