Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

Help with pagemediaselect multiple images

form

Started by Justus 7 years ago · 2 replies · 1140 views
7 years ago

Hi,

I've extended the default page form with a pagemediaselect field with the multiple: true attribute. However, when I select multiple images and then save the page, the entries are replaced with just the word "Array" in both the Admin dashboard as well as the .md page file.

What am I doing wrong?

Thanks!

TXT
title: Test

'@extends':
type: default
context: blueprints://pages

form:
fields:
tabs:
type: tabs
active: 1

YAML
  fields:
    content:
      fields:

        header.slogan:
          type: text
          style: vertical
          label: Slogan
          ordering@: header.title

        header.gallery:
            type: pagemediaselect
            style: vertical
            label: Page Gallery
            multiple: true

image|286x95

👍 1
7 years ago

So you created a separate blueprint file with the code you posted correct? And where did you place the file in your folder structure?

7 years ago

Yup, correct. user/blueprints/pages/home.yaml. The blueprint itself seems to be working as my "header.slogan" field specified in the same blueprint works fine. It's just the header.gallery pagemediaselect field that I'm having trouble with, as specified above.

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1144 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 63 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 138 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 114 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 132 7 months ago