• PaulH

    (@paulhuckstepp)


    I’m trying to set up a custom block that will allow the user to add multiple images to it (slideshow). However, after adding a file field and setting the file_format_type to multi, and file_type to images, the field doesn’t show up.

    I tried setting it to single image, and the field shows but it will not show a thumbnail for a selected image.

    The field definition I’m using is based on one I created in the field editor for Posts. As there isn’t any reference in the docs for the file field type for the Block API.

    And I presume that repeatable fields are not possible with the Block API at the moment?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support Paul Clark

    (@pdclark)

    Difficult to say without running tests on the implementation. The plugin Slack channel is one way to share more complex code bases without it being archived online.

    The first place to check would be the JavaScript error console.

    Another workaround might be to use a relationship field instead, either to a post with a file field, to an attachment post type (Media Library), or to use multiple file fields.

    Thread Starter PaulH

    (@paulhuckstepp)

    Thanks for the info. I’ll look into it. According ot the docs ‘relationship’ fields are not available with the block api.

    FYI – There are no errors in the javascript console.

    • This reply was modified 7 months, 3 weeks ago by PaulH.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Block API – File Field – multiple files’ is closed to new replies.