Support

Account

Home Forums ACF PRO acf_form and basic uploader

Solving

acf_form and basic uploader

  • Hello,

    When i’m creating a form on the front end, event if I specify ‘uploader’ => ‘basic’ in acf_form() the all wordpress upload library is loaded on the page ๐Ÿ™

    There is a way to avoid that ?

    Thank you !

  • Hi @manioums

    Keep in mind that the “uploader” option only works on ACF PRO. You can hide the other posts’ uploaded content by setting the “Library” to “Uploaded to post”.

    I hope this helps ๐Ÿ™‚

  • Hi James,
    Thank you for your anwser, however i was not very clear, i’m sorry.
    With the “all wordpress image upload library” i mean the all code and scripts loaded with it on the page. For example when you load the wordpress image upload on the front end, all those script are added :
    /wp-includes/js/jquery/ui/draggable.min.js
    /wp-includes/js/jquery/ui/slider.min.js
    /wp-includes/js/jquery/jquery.ui.touch-punch.js
    /wp-admin/js/iris.min.js
    /wp-admin/js/color-picker.min.js
    /wp-content/plugins/advanced-custom-fields-number-slider/js/input.js
    /wp-content/plugins/advanced-custom-fields-number-slider/js/simple-slider.js
    /wp-includes/js/underscore.min.js
    /wp-includes/js/shortcode.min.js
    /wp-includes/js/utils.min.js
    /wp-includes/js/backbone.min.js
    /wp-includes/js/wp-util.min.js
    /wp-includes/js/wp-backbone.min.js
    /wp-includes/js/media-models.min.js
    /wp-includes/js/plupload/plupload.full.min.js
    /wp-includes/js/json2.min.js
    /wp-includes/js/plupload/wp-plupload.min.js
    /wp-includes/js/mediaelement/mediaelement-and-player.min.js
    /wp-includes/js/mediaelement/wp-mediaelement.js
    /wp-includes/js/media-views.min.js
    /wp-includes/js/media-editor.min.js
    /wp-includes/js/media-audiovideo.min.js
    /wp-admin/js/editor.min.js
    /wp-includes/js/quicktags.min.js
    /wp-includes/js/wplink.min.js
    /wp-includes/js/thickbox/thickbox.js
    /wp-admin/js/media-upload.min.js
    /wp-includes/js/tinymce/tinymce.min.js
    /wp-includes/js/tinymce/plugins/compat3x/plugin.min.js
    (+ lot of html loaded directly on the page).

    What i’m asking is : why all this code is loaded when I use โ€˜uploaderโ€™ => โ€˜basicโ€™. Like the wordpress uploader is not used, it shouldn’t be loaded.

    (sorry for my bad english and thanks again for your answer).

  • Hi @manioums

    Did you set the ‘post_content’ option to true or had a WYSIWYG field in the form? If you did, ACF’s need those library to make the WYSIWYG editor works correctly.

    If you didn’t have that option or field, those libraries shouldn’t be loaded.

    I hope this helps ๐Ÿ™‚

  • Hi @james,

    Thank for your answer,

    post_content is set to fasle, i do have a WYSIWYG on the page but set to basic.
    The problem is not linked to this WYSIWYG basic editor because wheb i remove the Image Field completly, all the WordPress Upload Libray is is not loaded on the page anymore (and my basic WYSIWYG editor is still here).

    Can you give me a fix in order to don’t have thoses very big library when the uploader is set to basic ?

    Thank again ๐Ÿ™‚

  • Hi @manioums

    This is weird. I’ve just tried it again on my installation, and the basic uploader setting didn’t load those libraries. Another weird thing is that the WYSIWYG field always loads those libraries, even with the basic setting.

    Could you please tell me what ACF version do you use? Also, could you please share the JSON export of your field group so I can test it out on my installation?

    Thanks!

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

The topic ‘acf_form and basic uploader’ is closed to new replies.