Custom Module settings field, file picker

About this forum
These forums have not been active for several years. They're available for search and reference, but a lot of this information is likely out of date.

For current information, try visiting our Knowledge Base.

Home / Support / Custom Module Development / Custom Module settings field, file picker

This topic is: not resolved
Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #61908

    wpkonsulterna
    Participant

    Hi

    We are creating a custom slideshow module where the client can choose different slide types, eg. if the slide in the slideshow should be text, image and then we want to have a special pdf slide.

    So in this case the client should be able to pick out a pdf from the media library or upload a pdf, so very much similar how the Photo settings field works but instead of photos it should only accept pdf files.

    I was thinking that there would be like a general media library settings field that we could use and maybe even set which mime types it accepted but from what I see in the documentation (http://forum.wpbeaverbuilder.com/custom-module-documentation/) there are no such standard field settings types? I guess our option would then be to create a custom setting field?

    Appreciate your help!

    Regards

    Johan

    #61961

    Josh C
    Participant

    We noticed the same thing and ended up copying and modifying the photo field specifically for PDFs. Feel free to use it — https://github.com/ZestSMS/BB-PDF-field

    Everything is prefixed with zestsms to not conflict if/when they create a PDF upload field.

    #64621

    wpkonsulterna
    Participant

    Great Josh, really appreciate it!

    However I think something like this should be included in the core plugin, at least a more flexible media field which not only works with photos.

    #108299

    Didou
    Participant

    Hi Josh,

    thanks for sharing this, was about to do the exact same thing (modify the photo field) but this saves me lots of time and trouble.

    Sorry for reviving an old thread.

    edit: btw, made your code into a plugin to enable easy distribution.

    Regards,
    Didou

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

The forum ‘Custom Module Development’ is closed to new topics and replies.