Required fields in files blueprint

Hi -

I’m curious what are the best ways to implement required fields in files blueprint. I was hoping to setup a structure where I can enforce site editors to enter alt text and caption for every image they upload, and thought making them required was a good idea.

However, when a user uploads an image to a page from the panel, they can do so without filling in the required fields. They can also save the page without filling those fields, unlike other require fields on the page.

Would there be a good way to ensure that I enforce people to fill those fields before saving?

Thank you in advance!

Yes, because the required option only kicks in once the user tries to save the image form. I think there is an ideas issue, but currently you can’t enforce this.

One option would be to at least remind the user to go to the image view and enter the data via a file.upload:after hook. Unfortunately, there is no way to redirect the user to the files view via the hook.

Currently, I don’t have a better idea.

Anyway, welcome to the Kirby forum.

Great – knowing that it is not currently possible, I ended up requiring alt text and captions through the fields in the page blueprint, not in the file blueprint.