Page 1 of 1

Checkbox (Yes/No) column does not display as checkbox..

Posted: 18 Jun 2019
by tharais
Good morning..

Is there any way to show a checkbox column as an actual checkbox and not a YES or NO on the display form
which is how it displays on my forms..

What am I missing?

thanks..

Re: Checkbox (Yes/No) column does not display as checkbox..

Posted: 19 Jun 2019
by mnikitina
Hello, tharais!

Please try the following code, just paste it in the Javascript editor.

Code: Select all

function findElementByText(text) {
var jSpot = $("div.ms-formbody.fd_control:contains(" + text + ")")
.filter(function() { return $(this).children().length === 0;})

return jSpot;
}

findElementByText("Yes").replaceWith( "<input type='checkbox' disabled='disabled' checked='checked'/>" );
findElementByText("No").replaceWith( "<input type='checkbox' disabled='disabled'/>" );

Re: Checkbox (Yes/No) column does not display as checkbox..

Posted: 20 Jun 2019
by tharais
Excellent.. worked great.. thanks mnikitina

TJ