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.
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!
CPT registration is coming to ACF! We demoed the new feature during the most recent session of ACF Chat Fridays. Check out the summary for the details. https://t.co/k2KQ3WWBAz— Advanced Custom Fields (@wp_acf) March 7, 2023
© 2023 Advanced Custom Fields.