Home Forums Front-end Issues Image upload not working acf_form();


Image upload not working acf_form();

  • Hi!

    First of all, ACF is a great plugin! However I’m struggling with the acf_form(). I’ve included my desired field group, but I’m not able to upload an image.

    The code I’m using is (with the <?php acf_form_head(); ?> above the get_header() function):

    		'post_id'=> $current_user->user_login, //same as post id
    		'field_groups' => array(5),
    		'submit_value'	=> 'update post'

    My console gives the following error:

    ReferenceError: Can’t find variable: acf
    TypeError: null is not an object (evaluating ‘acf.o.post_id’)

    When I click on upload image, the following error occurs in my console:

    TypeError: null is not an object (evaluating ‘acf.l10n.image’)

    Any idea’s?

  • I have the same problem here!
    have you found a solution ?

  • Hi,

    It seems the dependencies (js) isn’t loading properly.
    Can you check your sourcecode to make sure acf_form_head() is loading in properly?

    Also, do you have any fields using ajax in the form?

Viewing 3 posts - 1 through 3 (of 3 total)

The topic ‘Image upload not working acf_form();’ is closed to new replies.