Hi All,
Please find below Jquery script to hide the fields from NewForm.aspx, DispForm.aspx and EditForm.aspx page of SharePoint list
Hide fields from EditForm and NewForm
<
pre
class
=
"brush: js"
>
$(document).ready(function() {
$('nobr:contains("Recurrence")').closest('tr').hide();
$('nobr:contains("Location")').closest('tr').hide();
});
</
pre
>
Hide Fields from DispForm page
<
pre
class
=
"brush: js"
>
$(document).ready(function() {
// Method #1: Access by FieldName – All fields have unique FieldNames
$('td.ms-formlabel:contains("Location")').parent().hide();
// Method #2: Access by ID – NOTE: Not all fields have unique IDs
$('tr:has(td[id=SPFieldRecurrence])').not('tr:has(tr)').hide();
});
</
pre
>
Thanks,
Sachin K.
Sachin,
ReplyDeletewould I also be able to set the width of a textarea in the DispForm with this method?
Marco