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

Form does not submit when file field has validate.required true

Started by Muut Archive 9 years ago · 3 replies · 480 views
9 years ago

My form definition includes the following 'file' type filed. I have found that if the validate required part is there then the form will not submit, ie I click the submit button and nothing happens. Alternatively if I remove those two lines then it all works as expected. Any tips on where I should start for debugging this?

Note that the form loads and renders fine. Even the red asterisk shows up on that field when I include the validate required true.

YAML
    -
        name: photo-c-card
        label: 'Add a picture of your c-card'
        type: file
        multiple: false
        destination: user/data/membership-application-form
        accept:
          - application/pdf
          - application/x-pdf
          - image/*
        validate:
            required: true
9 years ago

There is no solution at the moment, other than removing the required validation.

9 years ago

Ok thank you. I will subscribe on the issue.

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 2935 9 years ago
Archive · by Muut Archive, 9 years ago
3 1111 9 years ago