I build a post creation form with Fluent Form plugin. Guest users will upload the doc or images via this form. So I add the File Upload field of Fluent Form into the post creation form and create a meta field (file upload field) for PDF file with Advanced Custom Fields (ACF) plugin at Dashboard. Current version of Fluent Form plugin is not supporting the ACF’s File field type. In this tutorial I am showing how you will map the Fluent Form’s file filed with ACF’s file and image field. Therefore user and admin can easily handle the file and images from both frontend and backend.
Minimum requirements for this tutorial
- Fluent Form plugin (Paid Version)
- Advanced Custom Fields plugin
Creating File Upload Field with ACF Plugin
I am creating the file upload field for dashboard with Advanced Custom Fields plugin. Therefore admin can easily add/edit the file of a post from backend. I did the following settings for file.
Mapping FF File Field with ACF File & Image Field
– PHP Snippet
Add the following PHP codes into the theme’s functions.php.
The rest of the content is available for Pro members. Click on the PAY NOW button to enable access to this content.
$30.00Pay Now
* Payment is non-refundable.
Paid members will be able to login below to see the restricted content.
Login
– Setting Post Creation Form
Fluent Form released a module “Post/CPT Creation”. So you can easily create a post creation form with it and guest user can create the post from frontend. I already built a form. Here I am sharing the File filed type settings for the PDF file. Please check out the video.
Christian Strand (verified owner) –
How do we amend the code if we need to activate these fields in more than one form?
Paul –
You would remove the first IF statement from the code. This one
if( $form->id != 12 )
return;
3W consultant (verified owner) –
Thanks for this useful tutorial