Answers.Body: <p>Ok found the solution to this.</p>
  
  <p>All input fields must have the following format fields[<em>handle</em>] - i was just using the handle!</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;input name="fields[firstName]" id="firstName" type="text" placeholder="First name *"&gt;
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-03-14T14:42:43.863Z
Answers.LastActivityDate: 2015-03-14T14:42:43.863Z
Answers.UserDisplayName: Daniel Paras
Body: <p>I'm trying to submit entry data via AJAX (using Guest Entries plugin) following what's written in a <a href="https://craftcms.stackexchange.com/questions/2130/ajax-submittions-to-guest-entries">similar question</a>, however even though I am not sending the data in JSON format, the data does not seem to want to save and keeps returning a "cannot be blank error" for every field submitted.</p>
  
  <pre><code>{"errors":{"title":["Title cannot be blank."],"add01e":["Email cannot be blank."],"firstName":["First Name cannot be blank."],"lastName":["Last Name cannot be blank."]}}
  </code></pre>
  
  <p>These are, in reality, are being submitted as can be seen below. What's strange is that the sectionId and action are being processed for the server to respond with the latter list of errors.</p>
  
  <p>Sent Form Data Source:</p>
  
  <pre><code>action=guestEntries%2FsaveEntry&amp;sectionId=14&amp;firstName=asdsa&amp;lastName=dsad&amp;add01e=asd%40sd.com&amp;companyName=asd&amp;redirectUrl=%2Fcontent%2Fdownloads%2Fproducts%2Fstrokepad%2F6pm-strokepad-brochure-a4_web_300115.pdf&amp;title=Download+Request
  </code></pre>
  
  <p>Sent Form Data Parsed:</p>
  
  <pre><code>action:guestEntries/saveEntry
  sectionId:14
  firstName:asdsa
  lastName:dsad
  add01e:asd@sd.com
  companyName:asd
  redirectUrl:/content/downloads/products/strokepad/6pm-strokepad-brochure-a4_web_300115.pdf
  title:Download Request
  </code></pre>
  
  <p>Other details related to the request:</p>
  
  <pre><code>Request URL:http://craft.dev/
  Request Method:POST
  Status Code:200 OK
  
  Content-Type:application/x-www-form-urlencoded; charset=UTF-8
  </code></pre>
  
  <p>JS performing the ajax request:</p>
  
  <pre><code>var formData = $form.serializeArray();
  formData.push({name:'title',value:'Download Request'});
  $.post('/', formData , function(response) {
      if (response.success) {
        //On Submit Success
      }else{
        alert('An error occurred. Please try again.');
      }
  });
  </code></pre>
  
  <p>Any idea what I might be doing wrong?</p>
  
  <p>Thanks in advance!</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-03-14T14:43:04.453Z
Comments.Text: Added my own answer below
Comments.UserDisplayName: Daniel Paras
Tags: <ajax><guest-entries><plugin-guestentries>
Title: Submit via ajax to Guest Entries plugin
ThreadText: # Submit via ajax to Guest Entries plugin
  
  (Asked by: username_0 on 2015-03-14)
  
  I'm trying to submit entry data via AJAX (using Guest Entries plugin) following what's written in a [similar question](https://craftcms.stackexchange.com/questions/2130/ajax-submittions-to-guest-entries), however even though I am not sending the data in JSON format, the data does not seem to want to save and keeps returning a "cannot be blank error" for every field submitted.
  
  ```
  {"errors":{"title":["Title cannot be blank."],"add01e":["Email cannot be blank."],"firstName":["First Name cannot be blank."],"lastName":["Last Name cannot be blank."]}}
  
  ```
  
  These are, in reality, are being submitted as can be seen below. What's strange is that the sectionId and action are being processed for the server to respond with the latter list of errors.
  
  Sent Form Data Source:
  
  ```
  action=guestEntries%2FsaveEntry&sectionId=14&firstName=asdsa&lastName=dsad&add01e=asd%40sd.com&companyName=asd&redirectUrl=%2Fcontent%2Fdownloads%2Fproducts%2Fstrokepad%2F6pm-strokepad-brochure-a4_web_300115.pdf&title=Download+Request
  
  ```
  
  Sent Form Data Parsed:
  
  ```
  action:guestEntries/saveEntry
  sectionId:14
  firstName:asdsa
  lastName:dsad
  add01e:asd@sd.com
  companyName:asd
  redirectUrl:/content/downloads/products/strokepad/6pm-strokepad-brochure-a4_web_300115.pdf
  title:Download Request
  
  ```
  
  Other details related to the request:
  
  ```
  Request URL:http://craft.dev/
  Request Method:POST
  Status Code:200 OK
  
  Content-Type:application/x-www-form-urlencoded; charset=UTF-8
  
  ```
  
  JS performing the ajax request:
  
  ```
  var formData = $form.serializeArray();
  formData.push({name:'title',value:'Download Request'});
  $.post('/', formData , function(response) {
      if (response.success) {
        //On Submit Success
      }else{
        alert('An error occurred. Please try again.');
      }
  });
  
  ```
  
  Any idea what I might be doing wrong?
  
  Thanks in advance!
  
  **Tags:** ajax, guest-entries, plugin-guestentries
  
  > **Comments:**
  > **username_0**: Added my own answer below  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_0 on 2015-03-14. Score: 3
  
  Ok found the solution to this.
  
  All input fields must have the following format fields[*handle*] - i was just using the handle!
  
  Example:
  
  ```
  <input name="fields[firstName]" id="firstName" type="text" placeholder="First name *">
  
  ```
  
  
  ---
  
  