This project is read-only.

using TextFieldSettings to add class

Topics: Core
Aug 5, 2013 at 6:44 AM
Is it possible to add a new class to a textbox via the TextFieldSettings or to a dropdown via the EnumerationFieldSettings? Is there any way to do this?

The reason I want to is to add classes to fields in exposed forms like the ProfilePart. I can't use alternates since the fields are generated via code.

Aug 5, 2013 at 7:00 AM
I think you could do it by deriving from ContentDefinitionEditorEventsBase and implementing PartFieldEditor and PartFieldEditorUpdate.
Both return a list of TemplateViewModel objects, which are rendered using views using a naming convention. Look at the existing code. You should be able to do this from within your own module, thus without modifying the core code.
Aug 5, 2013 at 10:54 AM
The InputField has an EditorCssClass setting.