Answers.Body: <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>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-21T07:16:30.197Z
Answers.Text: Can you tell me how to set where to redirect to if the user isn't logged in? By default it goes to /login.
Answers.UserDisplayName: Gareth
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-21T14:35:21.907Z
Answers.Text: @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.
Answers.UserDisplayName: Matt Stein
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-12T05:04:56.690Z
Answers.Text: wouldn't you want to set enabled to false/0? He said he wants to review/moderate before publishing.
Answers.UserDisplayName: Luke Holder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-12T05:06:03.683Z
Answers.Text: 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
Answers.UserDisplayName: Luke Holder
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-12T05:35:01.947Z
Answers.Text: Updated 'enabled' setting in the example, thanks Luke.
Answers.UserDisplayName: Matt Stein
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-12T07:50:49.970Z
Answers.Text: @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).
Answers.UserDisplayName: carlcs
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-12T12:24:18.490Z
Answers.Text: 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.
Answers.UserDisplayName: Brandon Kelly
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2014-06-12T04:17:12.027Z
Answers.LastActivityDate: 2014-06-12T14:07:36.027Z
Answers.LastEditDate: 2014-06-12T14:07:36.027Z
Answers.UserDisplayName: Matt Stein
Body: <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>
  
Tags: <form>
Title: How do you create a front-end form for users to submit content?
ThreadText: # 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](http://buildwithcraft.com/docs/templating/entry-form) to accept posts from the front end.
  
  Example from the above linked page...
  
  ```
  <form method="post" action="" accept-charset="UTF-8">
      <input type="hidden" name="action" value="entries/saveEntry">
      <input type="hidden" name="redirect" value="viewentry/{id}">
      <input type="hidden" name="sectionId" value="10">
  
      <label for="title">Title</label>
      <input id="title" type="text" name="title">
  
      <label for="body">Body</label>
      <textarea id="body" name="fields[body]"></textarea>
  
      <input type="submit" value="Submit">
  </form>
  
  ```
  
  Deliberately removed from the example above is this `<input type="hidden" name="enabled" value="0">`, 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](https://github.com/pixelandtonic/GuestEntries). 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`...
  
  ```
  <form method="post" action="" accept-charset="UTF-8">
      <input type="hidden" name="action" value="guestEntries/saveEntry">
      <input type="hidden" name="redirect" value="viewentry/{id}">
      <input type="hidden" name="sectionId" value="10">
  
      <label for="title">Title</label>
      <input id="title" type="text" name="title">
  
      <label for="body">Body</label>
      <textarea id="body" name="fields[body]"></textarea>
  
      <input type="submit" value="Submit">
  </form>
  
  ```
  
  The plugin's settings let you define default authors and entry statuses for each channel:
  
  ![GuestEntries plugin settings](https://i.sstatic.net/tMGL9.png)
  
  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 username_3.  
  > **username_4**: @username_1, 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.  
  
  ---
  
  