danjperron / microserre

interior green house control using esp32, tasmota and berry script
GNU General Public License v3.0
6 stars 1 forks source link

missing id for the labels ? #1

Closed ouinouin closed 1 month ago

ouinouin commented 4 months ago

in the following taken from HydroCycle_ui lines 42-44 , it looks like there no use of ID in the html , normally the label for is linked to an id. being an absolute crap in html and not that great in programming, i take your code as inspiration for making a small ui in tasmota.

webserver.content_send(format("<input type='radio' name='PumpEnable' value='Enable' %s><label for='Enable'>Minuteur</label>", persist.PumpEnable=="Enable" ? " checked" : "")) webserver.content_send(format("<input type='radio' name='PumpEnable' value='OFF' %s><label for='OFF'>OFF</label>", persist.PumpEnable== "OFF" ? " checked" : "")) webserver.content_send(format("<input type='radio' name='PumpEnable' value='ON' %s><label for='ON'>ON</label>", persist.PumpEnable=="ON" ? " checked" : ""))

i would propose adding the id: webserver.content_send(format("<input type='radio' id='Enable' name='PumpEnable' value='Enable' %s>", persist.PumpEnable=="Enable" ? " checked" : "")) does it makes sense ? , is it uninportant in the particular use of tasmota ? i d be glad if you could give an answer for me to progress in the making of html+ berry + tasmota. (look at the berryton project on github, i d like to add some web pages to this project) thanks in advance .

danjperron commented 4 months ago

Hum… not sure since the ID is in the form but adding ID could be a good thing.

I don’t have a problem at all with the current setup. The hydroponics system works fine all winter and spring.

It is off right now since everything is outside for summer.

I made pesto at least three times (250ml), eaten strawberrys and little tomatoes all winter.

Regards,

Daniel

Le 29 juin 2024 à 10:44, ouinouin @.***> a écrit :

in the following taken from HydroCycle_ui lines 42-44 , it looks like there no use of ID in the html , normally the label for is linked to an id. being an absolute crap in html and not that great in programming, i take your code as inspiration for making a small ui in tasmota.

webserver.content_send(format("<input type='radio' name='PumpEnable' value='Enable' %s>", persist.PumpEnable=="Enable" ? " checked" : "")) webserver.content_send(format("<input type='radio' name='PumpEnable' value='OFF' %s>", persist.PumpEnable== "OFF" ? " checked" : "")) webserver.content_send(format("<input type='radio' name='PumpEnable' value='ON' %s>", persist.PumpEnable=="ON" ? " checked" : ""))

i would propose adding the id: webserver.content_send(format("<input type='radio' id='Enable' name='PumpEnable' value='Enable' %s>Minuteur", persist.PumpEnable=="Enable" ? " checked" : "")) does it makes sense ? , is it uninportant in the particular use of tasmota ? i d be glad if you could give an answer for me to progress in the making of html+ berry + tasmota. (look at the berryton project on github, i d like to add some web pages to this project) thanks in advance .

— Reply to this email directly, view it on GitHub https://github.com/danjperron/microserre/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABBF7XD3EFG4FG3IEPGLM3DZJ3B3LAVCNFSM6AAAAABKDIDTY6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGM4DCNZYHA2DEMI. You are receiving this because you are subscribed to this thread.