I want to set the value of yes/no field.Through JavaScript I got the field control but unable to set value.

  • Monica, can you please paste the code you have for getting the field control? Oct 23, 2012 at 10:25

2 Answers 2


Yes/No control is a html checkbox so if you want to check it you need to set CHECKED attribute of the control to some value CHECKED = "checked" if you want to uncheck it you need to remove this attribute. To set value of the control you need to set "value" attribute to your value.

Easily done using jQuery:

$('input[name=SimpleHTMLCheckbox]').attr('checked', true);

You can set checked the property using jQuery.

$('input[name=SimpleHTMLCheckbox]').prop('checked', true);

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.