0

I'm basically trying to keep 5 columns of my list locked(uneditable) while the last column editable. I'm a beginner and thought this would be the easiest way to achieve this. Do kindly suggest any other alternative if possible.

0

This is not possible out of the box. You can limit it but not block it. ie User may still find a away of editing it if its smart.

Sharepoint is not transactional system and doesn't have something called field level security.

Now what you can do.

I have delivered something similar in the past using InfoPath forms. WIht IP you can specify which IP view is showed for new and edit form. On 'New' view you make all the fields editable. On the Edit view you make only the last column editable.

There are as well some other ways of achieving it using javascript but I haven't used them so cannot give much advice in this area. (you embed js in the new/edit forms and make the fields view only. )

But with any of those options user can still go to the list switch to the datasheet view and edit value - so you can limit it but not block it as mentioned earlier.

0

To make the field read only on the edit form, you can use the script editor on Edit item page.

Add below code in the script editor:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.1/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript">    
     $(document).ready(function() {    
           //Set the Field to Read only and change its background colour
           $("input[title='FieldName']").attr("readonly","true").css('background-color','#F6F6F6');        
     });   

You can repeat the read only statement for all other fields you want to make ready only(just make sure you are using right jquery selector).

Use following link to add script editor on page:

Add script editor on page.

  • have you tried this? – Ganesh Sanap Nov 15 '18 at 11:44

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.