2

I have a request to add a save draft button in a new form!

how to add this button using javascript and when the user clicks it update list item field Draft to yes?

  • Do you just need to save item/ file as a draft and handle the draft process? or you have specific requirements to add this button in your form and write code !!?! – Mohamed El-Qassas MVP Sep 19 '18 at 1:39
2

If your goal to handle the Draft process, so I suggest you think first SharePoint!

The SharePoint already handle the Draft process as the following:

Option 1

Draft items in Document library:

You can handle the draft files by Enabling Check-Out and Check-in functionality

  • Library setting > Versioning Settings.
  • Below Require Check Out, check Yes.

enter image description here

Now check out the file, edit and save it as a draft, then reflect your changes by performing check-In

Note: Check-Out and Check-in functionality is not available for list

Draft items in List:

You can enable the versioning with Content Approval to handle the draft items by doing the following:

  • Open List setting > Versioning Settings.
  • Enable Content Approval, versioning.
  • Set The draft item security as you prefer.

enter image description here


Option 2

You can also manage Draft as OOTB as the following:

  • Create a Yes/No draft field with default value No

enter image description here

  • Create a view to filter with Draft = Yes and Created By = [Me]

enter image description here


Option 3

If you have SharePoint Enterprise edition, you can use InfoPath to customize your form as the following:

  • Add a new Button, set the display name to Save To Draft.
  • Add a rule to set the Draft status to Yes.

If the above options are not satisfied with your requirements, and you need to do it by adding a button manually, you can check:

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.