Home>Support>Media Form field documentation error

Media Form field documentation error

Notice: This thread is over two years old; the information may be outdated. Please consider creating a new thread if you require free support. If you have an active SiteOrigin Premium license, you can email our premium support desk at [email protected].

Media type form field for widget doesn’t take the values specified here https://siteorigin.com/docs/widgets-bundle/form-building/form-fields/ . “all” option is “*” and it takes file mime types, so for example for pdf you can just type application/pdf. That data must be hooked up to a wrong variable in wp core inside that media popup xhr.

This is our free support forum. Replies can take several days. If you need fast email support, please purchase a SiteOrigin Premium license.

  1. 8 years, 7 months ago Alex S
    Hi, I Work Here

    Hi Roman,

    I’m unable to replicate what you’ve described. Could you send me a copy of your code so I can check over it?

    For reference, application/pdf doesn’t, or rather in your case, shouldn’t work. There also isn’t an all option.

  2. 8 years, 7 months ago Roman Ranniew

    That’s my point. According to the documentation “all” should fetch all of the library items, while it gives none. Instead “*” returns all file types. I’m extending SiteOrigin_Widget class, exactly like the widgets from the widgets bundle.

    I simply checked your core code. You can also simply replicate it by changing “data-library” field inside any widget that has media button in the wp admin.

  3. 8 years, 7 months ago Alex S
    Hi, I Work Here

    Hi Roman,

    Maybe we’re looking at different documentation – there’s no mention of the word all. To clarify, are you reading this documentation or different documentation?

    I stand corrected regarding all working though – that does in fact work. Regardless, it’s not actually mentioned. Is your issue that it’s not mentioned?

  4. 8 years, 7 months ago Roman Ranniew

    Yes! Apologies, my fault, it’s pretty hectic here. Yes. The ‘all’ option came from wp documentation on the media upload button. I thought that you’re using that function to create the media button, but apparently not.

Replies on this thread are closed. Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Get The Most Out of SiteOrigin with SiteOrigin Premium

Find Out More