<p>I believe you're looking for <code>entryRevisions/publishDraft</code>:</p>

<pre><code>&lt;input type="hidden" name="action" value="entryRevisions/publishDraft"&gt;
</code></pre>

<p>You can see the specific inputs it is looking for here: <a href="https://github.com/craftcms/cms/tree/master-v2/src/controllers/EntryRevisionsController.php#L188" rel="nofollow noreferrer">https://github.com/craftcms/cms/tree/master-v2/src/controllers/EntryRevisionsController.php#L188</a></p>

CC BY-SA 3.0
2016-12-17T07:32:38.087Z
Hi Brad, thanks for your support. As I have two buttons in the form "save as draft" and "publish" I want the user to click either or. So either the forms content is being saved as draft or it is being published.
user5991
CC BY-SA 3.0
2016-12-17T07:51:01.260Z
Maybe something similar than this: `<input type="submit" action="entryRevisions/saveDraft" value="Save as draft">
    <input type="submit" action="entryRevisions/entries/saveEntry" value="Publish">`. Unfortunately this is not working. Any idea how to make it work?
user5991
CC BY-SA 3.0
2016-12-16T19:44:12.067Z
2018-02-21T23:43:58.117Z
2018-02-21T23:43:58.117Z
Brad Bell
<p>in my frontend entry form I have a "save as draft" submit button.
The current action for this form is the following, which saves the entry submitted through the form as a draft (status: disabled):</p>

<pre><code>&lt;input type="hidden" name="action" value="entryRevisions/saveDraft"&gt;
</code></pre>

<p>Next to the "save as draft" button I would like to have a "publish" button. If the user clicks on it the entry should be submitted as "status: live". If the user clicks on "save as draft" it should be submitted as "status: disabled". Any idea how to do this?</p>

<templating><form><entry><frontend><entry-form>
frontend form action: save as draft or publish
# frontend form action: save as draft or publish

(Asked by: username_0 on 2016-12-16)

in my frontend entry form I have a "save as draft" submit button.
The current action for this form is the following, which saves the entry submitted through the form as a draft (status: disabled):


Next to the "save as draft" button I would like to have a "publish" button. If the user clicks on it the entry should be submitted as "status: live". If the user clicks on "save as draft" it should be submitted as "status: disabled". Any idea how to do this?

**Tags:** templating, form, entry, frontend, entry-form


---

## 1 answers

### Answer by username_1 on 2016-12-16. Score: 1

I believe you're looking for entryRevisions/publishDraft:


You can see the specific inputs it is looking for here: https://github.com/craftcms/cms/tree/master-v2/src/controllers/EntryRevisionsController.php#L188

> **Comments:**
> **username_0**: Hi Brad, thanks for your support. As I have two buttons in the form "save as draft" and "publish" I want the user to click either or. So either the forms content is being saved as draft or it is being published.  
> **username_0**: Maybe something similar than this: `<input type="submit" action="entryRevisions/saveDraft" value="Save as draft">     <input type="submit" action="entryRevisions/entries/saveEntry" value="Publish">`. Unfortunately this is not working. Any idea how to make it work?  

---

