10929 Posts in 2613 Topics by 1809 members
|Go to End|
16 March 2014 at 12:02pm Last edited: 16 March 2014 12:02pm
I'd like to extend AddCommentForm so I can output field labels with custom classes. I want to remove 'left' class from label as it conflicts with Foundation but ideally I want to have full control over outputted HTML.
I tried to extend CommentingController in mysite/code but no luck there...
Can I set it up so every field type has it's own .ss template?
How do I do this?
23 March 2014 at 6:21pm
You can have full control over the form markup by providing a custom CommentsInterface file. By default the form part is just dumped out using the standard form template but that doesn't need to be. See http://doc.silverstripe.org/framework/en/topics/forms#custom-form-templates for an example of the form markup (you can use <% with AddCommentForm %> to jump into the scope of the add view.
|Go to Top|