Placing sketch values into a table #402
-
Hello Hieromon, Thanks for the hard work you've put into your AutoConnect library. I've been using it to create a 4G SMS alert system for a security alarm panel based on an ESP32, with a user interface built using the AutoConnect menu structure. I'd like to be able to print out some useful status data from the SMS module to the web interface (such as 4G signal strength, the 4G network name, the current date etc) and present the results in a HTML table, something like this: I've been able to construct the table based on the example shown in your documentation regarding the use of ACElements to place styled HTML tags, but I'm not sure how to make the values in the right hand column link to sketch values, such that when the page is loaded it "pulls" the values out of the sketch and substitutes them in each of the cells. Is there a way to link a value from the sketch to one of the Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Rather than trying to describe the whole
Clunky, but appears to work OK. If there's a neater solution I'd be keen to see it. |
Beta Was this translation helpful? Give feedback.
Rather than trying to describe the whole
<table>
in one single ACElement definition, I can split HTML table into multiple ACElements. At the point at which the sketch variable needs to be appear in the relevant table cell, the ACElement<td>
statement is cut short and an ACText is inserted with a blank value. After the ACText has been defined the rest of the HTML table in the next ACElement. Rinse and repeat until the whole table is built up: