Support

Account

Home Forums Add-ons Gallery Field Gallery in Frontend form not restricting to post library

Solving

Gallery in Frontend form not restricting to post library

  • Hi there,
    I’m using the Gallery field in a frontend form. Works great. Except that, despite having selected “uploaded to post” for the library, it still gives access to the full media library. Is this an issue with the frontend form function? When I had it as a single image to upload the library restriction worked fine. But it doesn’t seem to want to for the gallery.

    Any ideas?

  • Hi @brotsky_pixie

    I’ve just tested it on my end but failed to reproduce it. Could you please try to reproduce the issue on one of the WordPress’ stock themes (like Twenty Sixteen) with other plugins deactivated? If it disappears, then you can activate the theme and plugins one by one to see which one causes the issue.

    If the issue persists, could you please share the JSON export file of your field group so I can test it out on my end?

    Thanks 🙂

  • Hi
    I recently observed the same problem when I was using acf_form() with the 'post_id' => 'new_post' setting.
    For me, the solution was to first create an 'auto-draft' post and then run the acf_form() on this posts’s ID:

    
    $thePostId = wp_insert_post( array('post_title' => 'Temporary Post Title','post_status' => 'auto-draft') );
    acf_form(array(
      'post_id' => $thePostId,
       ...
    
Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Gallery in Frontend form not restricting to post library’ is closed to new replies.