Community Discussion

uBot HTML UI checkbox is always on?

September 22, 2013
Drake83 Author Level 1

Write the reason you're deleting this FAQ

I'm trying to use a checkbox in my uBot HTML UI but it is always on. When I test the value, it is "on" whether the checkbox is checked or not. How do I use a checkbox properly in the HTML UI so that when it is not checked, it is not on? Here is my code:
<input type=\"checkbox\" name=\"testcheck\" value=\"testcheck\" variable=\"#testcheck\">

Is there anything wrong there?
2

Comments 2

September 22, 2013
Void
It looks like you forgot to put the fillwith value (fillwith="checked"), which will give an improper value in uBot. Try this:
<input fillwith=\"checked\" type=\"checkbox\" name=\"testcheck\" value=\"testcheck\" variable=\"#testcheck\">

That should give you a correct reading in uBot when you read the variable. 

Enter a reason for deleting this comment

Please login or sign up to leave a commentJoin