November Happy Hour will be moved to Thursday December 5th.

Required image description

Vote:
 

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!

#53673
Sep 19, 2011 15:39
Vote:
 

This is possible, you can use a Control Adaptor to override the edit mode rendering of the PropertyImageUrl control.
There's an example here: http://sdk.episerver.com/library/cms6/Developers%20Guide/Core%20Features/Properties/Property%20Types.htm

#53700
Sep 20, 2011 18:50
Vote:
 

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?

#53730
Sep 21, 2011 12:42
Vote:
 

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.

#53734
Sep 21, 2011 13:49
Vote:
 

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

Thank you for your help!

#53737
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.