s00500 / ESPUI

A simple web user interface library for ESP32 and ESP8266

Home Page:https://valencia.lbsfilm.at/midterm-presentation/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to update text when pressing a button

daniel-frenkel opened this issue · comments

I am trying to get the user's WiFi credentials.

To do so, I have two text inputs and one button

The user enters their wifi name into the first text box, then they click on the second text input and enter their password.

Then they press the save button.

The problem is that after they input the password and press save, the password text box does not fire off the inputted text, and this leaves the box empty after they press save.

Do you have any idea that can prevent this? Of course, the user can click somewhere outside the password text box or press enter to trigger the text to send, but that makes it more complicated to explain.

It seems like if you press a button directly from a text box, the text does not send first

The completeExample shows a way of doing this. Perhaps you could compare with what you are doing to see if you've missed anything?

I draw your attention to the need to have a callback for the text box, even if it doesn't do anything, if you want to listen to updates from it. Maybe it could be that.

@iangray001 Thanks for that, I copied the way you did it in the example and it works perfectly. I didn't see this example within Arduino, but it's great to have it to reference. Thanks for your hard work on this