Fast question: how do I get a variable into a HTML file in Flowcode?
I did that ones in FC, in a wired module but can't find the file anymore.
Any directions to an example?
I want to add a temperature into a HTML-file..
Thanks.
Add variable in html ESP32
-
- Posts: 336
- http://meble-kuchenne.info.pl
- Joined: Tue Dec 08, 2020 5:11 pm
- Has thanked: 93 times
- Been thanked: 67 times
-
- Valued Contributor
- Posts: 1002
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 191 times
- Been thanked: 217 times
Re: Add variable in html ESP32
Hi MJU20
You can use the %1.....%10 to set in the HTML Code
Maybe this two sample help
regards
Stefan
viewtopic.php?f=9&t=739
viewtopic.php?f=4&t=761
You can use the %1.....%10 to set in the HTML Code
Maybe this two sample help
regards
Stefan
viewtopic.php?f=9&t=739
viewtopic.php?f=4&t=761
Code: Select all
<html>
<body>
<h1>Flowcode App Developer Webserver</h1>
LED is %0
<br />
<form action="/page2.htm">
<input type="checkbox" id="0" name="0" value="ON" %1 >
<label for="0"> LED Control</label><br>
<input type="submit" value="Submit">
</form>
</body>
</html>
Re: Add variable in html ESP32
YES!! That was what I was looking for!
Thank you stefan.erni.
Too bad I can't read the example files.
I don't have the app develop tools..
Do I need to name the variable in FC %0?
Thank you stefan.erni.
Too bad I can't read the example files.
I don't have the app develop tools..
Do I need to name the variable in FC %0?
-
- Matrix Staff
- Posts: 1471
- Joined: Sat Dec 05, 2020 10:32 am
- Has thanked: 204 times
- Been thanked: 348 times
Re: Add variable in html ESP32
Attached is one of those projects saved as a .fcfx file. It might not work in this form, but at least you should be able to load it and see what is happening.
The WebServer component allows you to change the values of the %1 (etc) substitution variables using the macro "SetOutValue".
The WebServer component allows you to change the values of the %1 (etc) substitution variables using the macro "SetOutValue".
- Attachments
-
- AppDev_Webserver_LED.fcfx
- (16.73 KiB) Downloaded 405 times