Save to draft button in SharePoint
-
23-01-2021 - |
Domanda
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?
Soluzione
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.
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.
Option 2
You can also manage Draft as OOTB as the following:
- Create a
Yes/No
draft field with default valueNo
- Create a view to filter with Draft =
Yes
and Created By =[Me]
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: