1

Does anything need to be done to allow for ajax submittions using the GuestEntries plugin? https://github.com/pixelandtonic/GuestEntries

I'm following the method used here for Contact form, it submits fine and returns success but nothing shows up in the DB?

https://github.com/pixelandtonic/ContactForm#ajax-form-submissions

in chrome the request looks right?

Request URL: http://familiar.dev/
Request Method: POST
Request Payload:
{"action":"guestEntries/saveEntry","sectionId":"5","enabled":"1","redirect":"contact/thanks","title":"asdsa"}

any ideas?

  • What's the response look like in Chrome? Anything weird getting logged in craft/storage/runtime/logs? – Brad Bell Aug 23 '14 at 23:23
  • So i think i figured it out. my payload was sent as json instead as regular form data. I reformatted and everything is working! – Keith Mancuso Aug 23 '14 at 23:40
  • Ahh... nice catch. – Brad Bell Aug 23 '14 at 23:41
1

So looks like i found the answer. My javascript was submitting the data as json instead of as regular form data. I reformatted and it works as expected.

Whoops.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.