Home › Forums › General Issues › Frontend form – post via ajax? › Reply To: Frontend form – post via ajax?
@valpe and @rasso and all thank you for providing those code snippets, it’s really great starting point for those who doesn’t have much clue.
However I’m afraid the basic uploader isn’t covered or is it?
Using the above methods I’m able to submit a new custom post, but only wp native uploader attachments are actually being saved. I recall that the native uploader actually “does upload” during its dialog, while the basic one doesn’t.
How would you suggest to include those attachments by the ajax call?
Or maybe it can be hooked in via ‘acf/pre_save_post’ using wp_handle_upload and updating them fields with attachment IDs accordingly? I noticed file names are present in the $form e.g. field_5a29532806a20%5D=url%3DC%253A%255Cfakepath%255Ca8WRYY1_700b.jpg%26size%3D327854%26type%3Dimage%252Fjpeg%26width%3D600%26height%3D2944
Any help is greatly appreciated. Needless to say everything works just fine w/o ajax. I’m on 5.6.5 pro.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Privacy Policy. If you continue to use this site, you consent to our use of cookies.