This topic contains 3 replies, has 2 voices, and was last updated by  Alex Kladov 3 weeks, 1 day ago.

  • Author
    Posts
  • #9423

    devr52
    Participant

    I have an FEF with a file type field.
    It always uses the basic uploader, never the media uploader.
    How do I get it to use the media uploader?

  • #9425

    Alex Kladov
    Participant

    Hi @devr51! I was just working on File field myself, so thought I’d chime in.

    In Piklist’s Developer Documentation for File (Upload) Field, they state that you need to omit 'basic' => true under options, if you want to use “WordPress media uploader”, otherwise it will use the “basic uploader”.

    So if you have something like this:

    
    piklist( 'field', array(
      'type'    => 'file',
      'field'   => 'my_upload_field',
      'label'   => 'Upload Field',
      'options' => array(
        'basic'        => true, // <=== REMOVE THIS, if you want to use WordPress media uploader
        'button'       => 'Add Image',
        'preview_size' => 'medium',
      ),
    ) );
    

    Change it to this:

    
    piklist( 'field', array(
      'type'    => 'file',
      'field'   => 'my_upload_field',
      'label'   => 'Upload Field',
      'options' => array(
        'button'       => 'Add Image',
        'preview_size' => 'medium',
      ),
    ) );
    

    And it should switch to using “WordPress media uploader”.

  • #9426

    devr52
    Participant

    Yes. I also read that in the documentation and I did exactly that.
    It still is only showing the basic uploader, which is exactly why I posted this ticket. It’s not working as documented.

    • #9427

      Alex Kladov
      Participant

      I see, fair enough. It’s definitely possible that it’s an actual bug.

      Can you paste your piklist( 'field', array(...) ); code here? Maybe I’ll be able to find something.

You must be logged in to reply to this topic.