getkirby / ideas

This is the backlog of ideas and feature requests from the last two years. Use our new feedback platform to post your new ideas or vote on existing ideas.
https://feedback.getkirby.com
20 stars 0 forks source link

File fields: show validation in on section #86

Closed ghost closed 4 years ago

ghost commented 6 years ago

@SebastianEberlein commented on Mar 31, 2018, 2:18 PM UTC:

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:

kirby-2

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 to required: true. The page blueprint project.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 the list layout…

validation

I’m not sure if there is a good solution that also works for every edge case. But it would be nice to have…

This issue was moved by bastianallgeier from k-next/kirby#349.

ghost commented 6 years ago

@distantnative commented on Aug 24, 2018, 9:12 AM UTC:

Also check: #616

ghost commented 6 years ago

@distantnative commented on Aug 24, 2018, 9:14 AM UTC:

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

johannahoerrmann commented 5 years ago

The need for a visible validation / treatment of required fields for files came up again when @bastianallgeier shared drag and drop upload of images in textfields in March. Some good ideas on how to treat this issue in this thread: https://getkirby.slack.com/archives/C661TEKP0/p1551886384072000 I would love to see "a completely rewritten uploader that makes it possible to edit each image individually"! (https://getkirby.slack.com/archives/C661TEKP0/p1551958718088500?thread_ts=1551886384.072000&cid=C661TEKP0)

felixhaeberle commented 4 years ago

Would love to see this feature be implemented. Other CMS systems like Drupal aren't allow people to not fill out the alternative tag. In my opinion it's an major issue in kirbys panel workflow to not required these alternative content for images on default, or, to not give an ability to have some kind of inbuild validation for those fields.

Most confusing: Even if you make the alt field required on images they won't get checked when a page with this image is saved as already described by the issue author.

Thanks for putting such a great tool out in the world. Would love to help with this functionality given a starting point where is fix should go. 👍

johannahoerrmann commented 4 years ago

https://kirby.nolt.io/75