Required image description


When you add an image to a page, you are prompted for an url, a description and a title. When you don't enter a description, a message will appear warning you that this is not very browser-friendly. Is there a way to make the description a required field?

All ideas are welcome!

Sep 19, 2011 15:39

This is possible, you can use a Control Adaptor to override the edit mode rendering of the PropertyImageUrl control.
There's an example here:

Sep 20, 2011 18:50

Thank you, that's a start. In the example they add extra properties, how can i call to one of the properties (the description field) and change the isrequired setting?

Sep 21, 2011 12:42

I'm sorry, it just struck me that you are talking about the image insertion in the TinyMCE editor and not the EPiServer property PropertyImageUrl.
In that case, I don't know if there's an "elegant" way to do it, but you could probably just add some javascript to the file that has the image plugin (Util\Editor\tinymce\plugins\advimage\image.htm). You could do it as simple as just adding a function that checks if the description is set in the onclick of the submit button.

Sep 21, 2011 13:49

Yes, I just figured that out myself. And indeed, that works.

Thank you for your help!

Sep 21, 2011 15:13
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.