Hello,
I would like to use acf_form for a photo contest, with a front end form to submit photos.
“Photo” will be a custom post type with 2 taxonomies, but for my tests I use regular posts.
The form will only be available for registered users (subscriber role)
I created these custom fields :
– taxonomy 1
– taxonomy 2
– Photo upload 1
– Photo upload 2
I managed to do almost everything I needed 🙂
BUT
There’s a problem with the image upload… it seems only Editor role can upload. So I added a custom subscriber Role to WP to autorize upload, but then the subcribers can see all the medias ! Is there a way to prevent that ? I’d like them to only have access to their own uploaded photos.
Regarding security, can I only allow .jpg files for example ?
Also, I didn’t find a way to use the post thumbnail field, it can be useful.
here’s my code (I use ACF 5 Pro) :
<?php while ( have_posts() ) : the_post(); ?>
<?php acf_form(array(
'post_id' => 'new_post',
'new_post' => array(
'post_type' => 'post',
'post_status' => 'draft'
),
'post_title' => true,
'submit_value' => 'Submit your photo'
)); ?>
<?php endwhile; ?>
thanks if you can help !
thomas