how to retrieve checkbox value from form ?

オフライン

hello,

i have a form that needs to get user inputs. On this form there are text fields, check boxes and a validate button that runs the logic to retrive the inputs. I'm able to retrieve the text fields with a method that runs on the click of the validate button.

the code that works for the text fields:

var tolerance = getFieldByName("tolerance").getElementsByTagName("input")[0].value;

but the value i get when i use this same code with a checkbox is always " on " no matter if i tic the checkbox or not.

thanks,

Lucas