Tuesday, October 3, 2017

SharePoint YES/NO column align in a single row using JSOM Javascript in list form

SharePoint choice column in list form align in a single row :-

Before



After


Assign id to the <td> tag of ms-formbody of the control and add below code in JS file and call alignChoiceColumns() inside document.ready(), it additionally delete the next empty tr .



 function alignChoiceColumns(idOfTDTag) {
            var firstRadio = $("#" + fieldName + " table tbody tr td .ms-RadioText:eq(0)");
            $("#" + fieldName + " table tbody tr td .ms-RadioText:gt(0)").appendTo($(firstRadio));
            $("#" + fieldName + " table tbody tr:gt(0)").remove();
        }

No comments:

Post a Comment

Clearing Person/Group Values

To clear out or empty the values in person or group columns, how you do it depends on if the column is single-value or multi-value. For ...