Support

Account

Home Forums ACF PRO acf_form gives 414 error on submit

Solving

acf_form gives 414 error on submit

  • I’m using a series of acf_form() calls wrapped inside my own <form> tag to create a front-end online form. The form will be used to allow users to both edit existing posts and create new posts. This includes a content field which can contain lots of text. I was originally planning to collate and ajax the form contents myself, but it was proving too difficult to get the values of the acf fields. So I switched to trying out the default acf form submission.

    Now I find that because of the large amount of data in the post, any attempt to save the form results in a 414 error. I can’t find anything in the documentation that allows me to change the default acf ajax method of GET (which puts all of the data in the URL, creating the reason for the error) to POST.

    Surely I can’t be the first to come across this problem. What’s the solution?

  • The default method for acf_form is POST. Something on your site is changing this if you’re seeing GET in the method.

  • That’s not really very helpful. There are no settings at all for ACF that I can find on my site, and I don’t know of any other plugin or program I’d be running that would manipulate ACF’s code to change POST to GET.

    Is there a config file somewhere? Can you advise what file contains the ajax code that ACF is running when it submits?

    As I said, I’d handle the ajax submit myself by hijacking the submit, but whenever I try to access the field values (even something as simple as the post title) it’s blank / empty, no matter what method (javascript, jQuery or ACF API) I use.

  • Sorry it wasn’t much help. I don’t know of anything that would do this myself. In fact, I don’t think that a front end ACF form will even work if the method is changed from POST to GET. ACF never looks at $_GET and only looks in $_POST. This change would completely break ACF unless all of the submitted values in $_GET were somehow copied to $_POST on the server when submitted and I don’t know what mechanism may be used to accomplish this change.

    I would start by deactivating other plugins and trying a different theme and see if that has an effect on the submit method. After that, I’d be confused. I might look at hosting or anything else running on the server to see what could cause this.

Viewing 4 posts - 1 through 4 (of 4 total)

The topic ‘acf_form gives 414 error on submit’ is closed to new replies.