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.

General

Filepicker inside a list

Solved by pamtbaau View solution

Started by Jan 8 years ago · 1 replies · 660 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 Jerry Hunt, 4 days ago
2 82 12 hours ago
General · by pamtbaau, 17 hours ago
1 55 16 hours ago
General · by Andy Miller, 1 day ago
0 45 1 day ago
General · by Marcel, 12 months ago
6 348 5 days ago
General · by Duc , 5 days ago
3 43 5 days ago