Hi
Is there any way to force a mandatory filed to be filled in on upload???
I added a Notification Handler to alert me, that it not set.
But I like a way to fill this filed in with out having to go through to the media library and updating it there.
Hi
Is there any way to force a mandatory filed to be filled in on upload???
I added a Notification Handler to alert me, that it not set.
But I like a way to fill this filed in with out having to go through to the media library and updating it there.
Which version of Umbraco are you on? The behaviour differs depending on the version.
You can mark the field as mandatory on the media type, which will stop editors saving the item without it - but be aware that on v13 and earlier, drag-and-drop uploads bypass this entirely (the item is created and saved automatically with the field empty, which sounds like exactly what you’re seeing). On more recent versions (v16+), a mandatory property actually causes the drag-and-drop upload to fail, although the error messaging isn’t very clear for editors.
That said, if this is an ALT text field on the media item itself, I’d advise against that approach anyway. An ALT text field on the media item won’t work for multi-lingual sites and ALT text should really be contextual - the same image may need different ALT text depending on the page and context it’s used in.
You’d be better off putting the ALT text field in the content and using a fallback where possible.
Justin
Discussion on discord that might be useful here..
But out of the box contextual alt tags are a rabbit hole.. when you add in cropping/multilanguage
https://discord-chats.umbraco.com/t/33245649/alt-text-support-in-umbraco
Hi @mistyn8
It’s one of those things - never a perfect solution but just highlighting things to think about.
I hadn’t considered image crops but that’s a good point…
Justin
The site on V13 but I am planning to update the code for a new V17 site we are building.
There are notification Handlers that are check the page on publish, it shows an error if there no alt text set. So this will help the users know if the alt text is missing.