0

How can I hide Columns in New/Edit Form for contributors. Is there a option to do that. I'm using SP 2013 online & SP Designer.

  • use Client Side Rendering through JSLink for the form. – bkk Jun 23 '16 at 4:48
0

There are ways to do, basic option would be designing form using infopath.You can also do it by Client Side Rendering (JS link) for better understanding go through this blog

https://code.msdn.microsoft.com/office/CSR-code-samples-11-Fully-54ebcaa6

There are lots of blog for CSR to learn

Client-Side Rendering/JS Link documentation?

0

With the help of "SPServices" you can get the current user name . Add the users you want to hide a column in specific group. If the current user present in particular group hide the field using jQuery.

Add Content editor webpart in Newform/Editform.aspx and place the below script

<script type="text/javascript" src="/sites/test/Script/jquery.min.js"></script>
<script type="text/javascript" src="/sites/test/Script/jquery.SPServices.min.js">
</script>

<script language="javascript" type="text/javascript">
$(document).ready(function()
{
$().SPServices({
operation: "GetGroupCollectionFromUser",
userLoginName: $().SPServices.SPGetCurrentUser(),
async: false,
completefunc: function (xData, Status) {
var xml = xData.responseXML.xml;
if(xml.search('SharePoint Group') != -1)
{

$('nobr:contains("Column to hide")').closest('tr').hide();

}
}
});
});
</script>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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