Question

I am building a Custom html form and saving all the fields to a SharePoint Online list. I figured out adding text boxes and choice drop downs via JS/jQuery like,

var xxxxxxxx = $("#xxxxxxxx").val();

var yyyyyyyy = $("#yyyyyy").find("option:selected").text();

but can't figure out how to add HTML Checkbox (Yes/No) to a SharePoint Yes/No column.

Please suggest.

Thanks

Was it helpful?

Solution

For SharePoint Checkbox (Yes/No) column, it sholuld be $("#checkboxId").is(':checked').

As you can see the picture:

enter image description here

If you want to set the check box field value, it should be like this:

 $("#checkboxId").attr('checked', true)
Licensed under: CC-BY-SA with attribution
Not affiliated with sharepoint.stackexchange
scroll top