<p><strong>If the users are authenticated</strong> and have permission to post to the event section, you would use an <a href="http://buildwithcraft.com/docs/templating/entry-form" rel="noreferrer">entry form</a> to accept posts from the front end.</p>

<p>Example from the above linked page...</p>

<pre><code>&lt;form method="post" action="" accept-charset="UTF-8"&gt;
    &lt;input type="hidden" name="action" value="entries/saveEntry"&gt;
    &lt;input type="hidden" name="redirect" value="viewentry/{id}"&gt;
    &lt;input type="hidden" name="sectionId" value="10"&gt;

    &lt;label for="title"&gt;Title&lt;/label&gt;
    &lt;input id="title" type="text" name="title"&gt;

    &lt;label for="body"&gt;Body&lt;/label&gt;
    &lt;textarea id="body" name="fields[body]"&gt;&lt;/textarea&gt;

    &lt;input type="submit" value="Submit"&gt;
&lt;/form&gt;
</code></pre>

<p>Deliberately removed from the example above is this <code>&lt;input type="hidden" name="enabled" value="0"&gt;</code>, since it'd be redundant and make it more obvious how one might tamper with the form. Setting <code>enabled</code> to <code>1</code> would allow submitted posts to go live immediately.</p>

<p><strong>If you'd like to accept guest entries</strong> you can use Pixel and Tonic's <a href="https://github.com/pixelandtonic/GuestEntries" rel="noreferrer">GuestEntries plugin</a>. Keep in mind that the submissions will still be assigned to the Craft author (user with appropriate permissions) that you designate. The front-end form would look nearly identical, with a hidden action of <code>guestEntries/saveEntry</code>...</p>

<pre><code>&lt;form method="post" action="" accept-charset="UTF-8"&gt;
    &lt;input type="hidden" name="action" value="guestEntries/saveEntry"&gt;
    &lt;input type="hidden" name="redirect" value="viewentry/{id}"&gt;
    &lt;input type="hidden" name="sectionId" value="10"&gt;

    &lt;label for="title"&gt;Title&lt;/label&gt;
    &lt;input id="title" type="text" name="title"&gt;

    &lt;label for="body"&gt;Body&lt;/label&gt;
    &lt;textarea id="body" name="fields[body]"&gt;&lt;/textarea&gt;

    &lt;input type="submit" value="Submit"&gt;
&lt;/form&gt;
</code></pre>

<p>The plugin's settings let you define default authors and entry statuses for each channel:</p>

<p><img src="https://i.sstatic.net/tMGL9.png" alt="GuestEntries plugin settings"></p>

<p>GuestEntries also adds a <code>guestEntries.beforeSave</code> event that you can hook into with your own plugin and further act on submissions before they're added to the database.</p>

CC BY-SA 3.0
2014-06-21T07:16:30.197Z
Can you tell me how to set where to redirect to if the user isn't logged in? By default it goes to /login.
Gareth
CC BY-SA 3.0
2014-06-21T14:35:21.907Z
@Gareth I believe there's a `returnUrl` parameter you can use for that. If Craft's forcing you to the login screen it'll collect valid credentials and then whisk you off to the return URL. If you're wrongly getting prompted for credentials in the first place, that'd be a different problem to solve.
Matt Stein
CC BY-SA 3.0
2014-06-12T05:04:56.690Z
wouldn't you want to set enabled to false/0? He said he wants to review/moderate before publishing.
Luke Holder
CC BY-SA 3.0
2014-06-12T05:06:03.683Z
Also, if you want to be notified when someone submits data, you would need a plugin that uses the Craft CMS event for entry saved: http://buildwithcraft.com/docs/plugins/hooks-and-events#events
Luke Holder
CC BY-SA 3.0
2014-06-12T05:35:01.947Z
Updated 'enabled' setting in the example, thanks Luke.
Matt Stein
CC BY-SA 3.0
2014-06-12T07:50:49.970Z
@Matt, please add to your answer that it is also possible to allow anonymous entry submissions using the [GuestEntries Plugin](https://github.com/pixelandtonic/GuestEntries).
carlcs
CC BY-SA 3.0
2014-06-12T12:24:18.490Z
If you don't want the entry to be enabled, you can just remove the whole input altogether. Form inputs can easily be tampered with though, so what’s really important here is that your users don’t have permission to publish live entries in this section. That will trump whatever the "enabled" param is set to.
Brandon Kelly
CC BY-SA 3.0
2014-06-12T04:17:12.027Z
2014-06-12T14:07:36.027Z
2014-06-12T14:07:36.027Z
Matt Stein
<p>I'd like to create a form for users to load events (that I will moderate and publish).</p>

<p>How do I do this?</p>

<form>
How do you create a front-end form for users to submit content?
# How do you create a front-end form for users to submit content?

(Asked by: username_0 on 2014-06-12)

I'd like to create a form for users to load events (that I will moderate and publish).

How do I do this?

**Tags:** form


---

## 1 answers

### Answer by username_1 on 2014-06-12. Score: 18 | Accepted answer

If the users are authenticated and have permission to post to the event section, you would use an entry form to accept posts from the front end.
Example from the above linked page...

    
    
    

    Title
    

    Body
    

    


Deliberately removed from the example above is this , since it'd be redundant and make it more obvious how one might tamper with the form. Setting enabled to 1 would allow submitted posts to go live immediately.
If you'd like to accept guest entries you can use Pixel and Tonic's GuestEntries plugin. Keep in mind that the submissions will still be assigned to the Craft author (user with appropriate permissions) that you designate. The front-end form would look nearly identical, with a hidden action of guestEntries/saveEntry...

    
    
    

    Title
    

    Body
    

    


The plugin's settings let you define default authors and entry statuses for each channel:

GuestEntries also adds a guestEntries.beforeSave event that you can hook into with your own plugin and further act on submissions before they're added to the database.

> **Comments:**
> **username_3**: wouldn't you want to set enabled to false/0? He said he wants to review/moderate before publishing.  
> **username_3**: Also, if you want to be notified when someone submits data, you would need a plugin that uses the Craft CMS event for entry saved: http://buildwithcraft.com/docs/plugins/hooks-and-events#events  
> **username_1**: Updated 'enabled' setting in the example, thanks Luke.  
> **username_4**: @Matt, please add to your answer that it is also possible to allow anonymous entry submissions using the [GuestEntries Plugin](https://github.com/pixelandtonic/GuestEntries).  
> **username_5**: If you don't want the entry to be enabled, you can just remove the whole input altogether. Form inputs can easily be tampered with though, so what’s really important here is that your users don’t have permission to publish live entries in this section. That will trump whatever the "enabled" param is set to.  
> **username_2**: Can you tell me how to set where to redirect to if the user isn't logged in? By default it goes to /login.  
> **username_1**: @username_2 I believe there's a `returnUrl` parameter you can use for that. If Craft's forcing you to the login screen it'll collect valid credentials and then whisk you off to the return URL. If you're wrongly getting prompted for credentials in the first place, that'd be a different problem to solve.  

---

