we have a requirement to automatically fill certain fields, before the check in activity for the new form of the document library,

how can this be achieved?

it seems like the new form of the document library cannot be opened in the full page and cannot edit it in order to add CEWP / SEWP..

  • I'm not certain I understand the question. Would using a 'default value' in the fields achieve what you want? Or otherwise make it a mandatory field, so users are obliged to enter a value in the field. – Tally Oct 23 '18 at 13:19
  • we need to auto set some of the field values with out user entering the values for those fields and hide it.. i am looking something similar to PreSave action for the custom list in the sharepoint for setting the field values without user input – Pradeep Oct 23 '18 at 15:12

In Document Library Settings>Advanced Settings>Allow Management of Content Types.

Add all the fields you need to the content type. Still in the Doc Library Settings, click on your content type to edit it. There is a Status column, where Status can be Required, Optional, Hidden. Yes, so you can see where I'm going with this. The fields you set to hidden will not show up when the user is uploading a document.

As for the value in the hidden field(s) - if you define the hidden fields to have a default value then the field will be populated with that value when a new document is uploaded; that would happen behind the scenes.

  • hi tally, it is very good suggestion, but we are opening this new form from different set of pages, depending on the page title from which it is opening,the value of the fields needs to be set.. the url for new form will have the query string appended, that needs to be set in the field using jslink/javascript – Pradeep Oct 25 '18 at 9:01

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.