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

Upload from a form

Started by Muut Archive 9 years ago · 5 replies · 417 views
9 years ago

Hi, I'm looking for the way to do this for a while now, and I don't get it.
Is it possible to make a form with an upload field? Does anyone have an example?

thanks

9 years ago

tnx, but I don't see clearly how to add this info to a form :( any tips?
tnx

9 years ago

The form is configured in the page frontmatter/header of the page containing the form.
As an example of how to add the upload field to a form:

YAML
form:
    name: my-form
    fields:
        -
            name: images
            type: file
            multiple: true
            destination: '@self'
            accept:
                - 'image/*'

This will allow you to select and upload image files.
Screenshot at Mar 05 14-26-10

9 years ago

Thank you, this looks better, I'll give it a try and get back to tell...tnx again.

9 years ago

ok, it's working this way, thanks for your help!

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1333 9 years ago
Archive · by Muut Archive, 9 years ago
2 924 9 years ago
Archive · by Muut Archive, 9 years ago
2 4055 9 years ago
Archive · by Muut Archive, 9 years ago
1 2938 9 years ago
Archive · by Muut Archive, 9 years ago
3 1111 9 years ago