Closed SebastianEberlein closed 6 years ago
Also check: https://github.com/k-next/kirby/issues/616
@wottpal:
With Kirby & files I often had one problem: I upload a file into a page and forget to fill in required fields of the file. But this is no problem for Kirby and I can even save the page. So why not either
Disallow saving a page and display a form-error message like with required fields of the page itself or keep the current behavior but highlight the files with missing fields e.g. with a red outline
This issue was moved by bastianallgeier to k-next/ideas#86.
The alt text for images is important for accessibility. That’s why in Kirby 2, I usually add a required text field for the alt text the next to the image field:
Of course, I could use a required file field for that. But when a user upload an image in the panel, they probably forget to click on the image after the upload to add the alt text in the file view.
Could there be a better solution in Kirby 3 with the new panel architecture and validating required file fields in the page blueprint?
Example from the Starterkit: In the file blueprint
cover.yml
, I set the "Alt Text" field torequired: true
. The page blueprintproject.yml
uses this file blueprint. So when I upload a cover image in the project page, the validation for this page also recognizes the required "Alt Text" field from the file blueprint:Idea 1) Immediately after the user uploads an image, a dialogue is shown that requires the user to fill in the required file fields. But this can be annoying if the user uploads multiple images at once. Or if the file blueprint has multiple required fields.
Idea 2) Show an error text in the file field. It could work in the
card
layout, but maybe not thelist
layout…I’m not sure if there is a good solution that also works for every edge case. But it would be nice to have…