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

Filepicker inside a list

Solved by pamtbaau View solution

Started by Jan 8 years ago · 1 replies · 768 views
8 years ago

I am trying to have a list auf items, one should be a an image. So I trying to achieve that with the filepicker. The problem is, whenever I hit the save button, the chosen image not chosen any more, so its basically not saved.

Outside the list, I can very well save the filepicker.

Anyone knows what I am doing wrong?

here is the exerpt from the blueprint:

YAML
        header.videos:
          name: videos
          type: list
          style: vertical
          label: Videos
          fields:
            .title:
              type: title
              label: Titel
            .url:
              type: text
              label: URL
            .show:
              type: toggle
              label: Zeigen?
              highlight: 1
              default: 1
              options:
                  1: 'Ja'
                  0: 'Nein'
              validate:
                  type: bool
            .header.a_file:
              type: filepicker
              folder: '@self'
              preview_images: true
              label: Select a file
last edited 09/11/18 by Jan
8 years ago Solution

@jacfab This seems to be a copy/past induced problem... Try renaming the field's name from '.header.a_file:' to '.a_file:' and it should work...

Suggested topics

Topic Participants Replies Views Activity
General · by jean-louis67, 3 weeks ago
2 308 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 310 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 264 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago