<p>I'd go with your first option.</p>

<p>Grab the <code>$_POST</code> values via <a href="http://buildwithcraft.com/classreference/services/HttpRequestService#getPost-detail" rel="nofollow">craft()->request->getPost()</a>, assemble them in your multiple <a href="http://buildwithcraft.com/classreference/models/EntryModel" rel="nofollow">EntryModels</a>, <a href="http://buildwithcraft.com/classreference/models/BaseModel#validate-detail" rel="nofollow">validate</a> each model, then pass them off to <a href="http://buildwithcraft.com/classreference/services/EntriesService#saveEntry-detail" rel="nofollow">craft()->entry->saveEntry()</a>.</p>

CC BY-SA 3.0
2015-03-16T17:27:40.900Z
2015-03-16T17:27:40.900Z
Brad Bell
<p>I need to create several entries in different channels from a single front-end form. I realise that to do this I will need to create a plugin to handle the request.</p>

<p>Can I just to iterate over the post values in my controller action, validate them and build the entry models for each new entry, then loop around Craft's EntryService <code>saveEntry()</code> service for each entry I want to save?</p>

<p>Or do I need to write my own <code>saveEntry()</code> service to handle saving multiple entries?</p>

<plugin-development>
How do I create a plugin to create and save multiple entries from one front-end form?
# How do I create a plugin to create and save multiple entries from one front-end form?

(Asked by: username_0 on 2015-03-16)

I need to create several entries in different channels from a single front-end form. I realise that to do this I will need to create a plugin to handle the request.

Can I just to iterate over the post values in my controller action, validate them and build the entry models for each new entry, then loop around Craft's EntryService `saveEntry()` service for each entry I want to save?

Or do I need to write my own `saveEntry()` service to handle saving multiple entries?

**Tags:** plugin-development

---

## 1 answers

### Answer by username_1 on 2015-03-16. Score: 3 | Accepted answer

I'd go with your first option.

Grab the `$_POST` values via [craft()->request->getPost()](http://buildwithcraft.com/classreference/services/HttpRequestService#getPost-detail), assemble them in your multiple [EntryModels](http://buildwithcraft.com/classreference/models/EntryModel), [validate](http://buildwithcraft.com/classreference/models/BaseModel#validate-detail) each model, then pass them off to [craft()->entry->saveEntry()](http://buildwithcraft.com/classreference/services/EntriesService#saveEntry-detail).


---

