Home › Forums › Front-end Issues › File uploader field doesn't appear in front-end if custom post is not published
Hi,
I’m using NRGnetwork theme (with BuddyPress) to make users able to share their projects (like Behance) without using wp admin panel.
They need to join a ZIP file to their project, that’s why I use acf_form()
to display a file uploader custom field. But, when they click on the button to display the new page to create their project post, my file uploader field doesn’t appear (there is only the “Update” button of this field).
When they publish the post and go back to the editing page, the field of the file uploader is ok and works perfectly.
Do you know how could I make appear my uploader file field at the first time, when the project post is not published yet ?
Hi @sireagroup
How are you using acf_form()
? Do you have it inside another form and set the form parameter to false so it’ll be included in that form instead? Do you have the acf_form_header()
function above get_header()
?
Hi @jonathan
Yes, acf_form()
is used in another form but I don’t understand what do you mean by “set the form parameter to false so itβll be included in that form instead?” (I’m a beginner)
Yes I use acf_form_header()
above get_header()
!
acf_form()
in itself creates a form so if you do not set it to false you will have a form within a form..
this is the parameter 'form' => true,
so acf_form(array('form' => false))
is minimum needed for it to work inside another form. + acf_form_header
of course π
Thank you @jonathan π
As you said, now the update button disappeared, but it doesn’t solve my problem about displaying the file uploader when the post is not published yet.
By the way, now when I publish my post for the first time (whithout file attached because the field wasn’t displayed), and then go back on my post to attach a file and click on my “Save” button, the file selected doesn’t seem to be uploaded, because when I go back to my post edit page, the field is empty.
Hi @sireagroup
Sorry I’ve not been able to work the forum for a while π
Do you still require assistance with this?
To answer your question, I am able to see your notes, altho it seems you’ve edited out the details now?
No problem, glad you worked it out!
Again sorry for taking so long to respond π
Best of luck in your project!
The topic ‘File uploader field doesn't appear in front-end if custom post is not published’ is closed to new replies.
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.