diff --git a/wire/modules/Fieldtype/FieldtypeComments/CommentForm.php b/wire/modules/Fieldtype/FieldtypeComments/CommentForm.php index 91a30186..3d680511 100644 --- a/wire/modules/Fieldtype/FieldtypeComments/CommentForm.php +++ b/wire/modules/Fieldtype/FieldtypeComments/CommentForm.php @@ -110,6 +110,7 @@ class CommentForm extends Wire implements CommentFormInterface { ), 'classes' => array( 'form' => '', + 'wrapper' => '', // when specified, wrapper inside
'label' => '', 'labelSpan' => '', 'cite' => 'CommentFormCite {id}_cite', @@ -607,41 +608,52 @@ class CommentForm extends Wire implements CommentFormInterface { * */ protected function renderFormNormal($id, $class, $attrs, $labels, $inputValues) { + + $classes = $this->options['classes']; $tag = $this->options['inputWrapTag']; + $labelClass = $classes['label'] ? " class='$classes[label]'" : ""; + + foreach($classes as $k => $v) { + $classes[$k] = str_replace('{id}', $id, $v); + } + + $formClass = trim("$class $classes[form] CommentFormNormal"); + $form = - "\n"; return $form; }