[GH-ISSUE #1321] Show confirmation page with success or error #1134

Open
opened 2026-02-28 01:28:40 +03:00 by kerem · 2 comments
Owner

Originally created by @bwjohns4 on GitHub (Dec 18, 2021).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1321

How can I show a confirmation page that connection was successful OR what the error was, then allow the user to close WM or the captive portal close automatically after a brief timeout? It looks like handleWifiSave is called when the credentials are submitted and that’s the last page. Then WM tries to connect, so only after then could it know the status but the configPortal is closed immediately and the client has no way to be triggered to reach out to the server after connect for status on the connection.

Originally created by @bwjohns4 on GitHub (Dec 18, 2021). Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/1321 How can I show a confirmation page that connection was successful OR what the error was, then allow the user to close WM or the captive portal close automatically after a brief timeout? It looks like handleWifiSave is called when the credentials are submitted and that’s the last page. Then WM tries to connect, so only after then could it know the status but the configPortal is closed immediately and the client has no way to be triggered to reach out to the server after connect for status on the connection.
Author
Owner

@bwjohns4 commented on GitHub (Dec 19, 2021):

I ended up modifying processConfigPortal() so that it does connect upon save but does not shutdown the portal immediately but instead flags itself as connected and waits 30s to close while still allowing the server to respond to requests.

Then I added some JavaScript in my response sent to client from handleWifiSave that shows "Loading" until the JavaScript request returns all the .innerHTML describing the success or failure.

<!-- gh-comment-id:997333658 --> @bwjohns4 commented on GitHub (Dec 19, 2021): I ended up modifying processConfigPortal() so that it does connect upon save but does not shutdown the portal immediately but instead flags itself as connected and waits 30s to close while still allowing the server to respond to requests. Then I added some JavaScript in my response sent to client from handleWifiSave that shows "Loading" until the JavaScript request returns all the .innerHTML describing the success or failure.
Author
Owner

@dronecz commented on GitHub (Mar 22, 2022):

@bwjohns4 I would like to implement similar functionality, could you pls share your changes or your changed library/files?

Many thanks

<!-- gh-comment-id:1075598074 --> @dronecz commented on GitHub (Mar 22, 2022): @bwjohns4 I would like to implement similar functionality, could you pls share your changes or your changed library/files? Many thanks
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#1134
No description provided.