SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Monica, can you please paste the code you have for getting the field control? – Arsalan Adam Khatri Oct 23 '12 at 10:25

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);
share|improve this answer

You can set checked the property using jQuery.

$('input[name=SimpleHTMLCheckbox]').prop('checked', true);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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