File tree 3 files changed +8
-1
lines changed
3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 13
13
14
14
use App \Entity \Comment ;
15
15
use Symfony \Component \Form \AbstractType ;
16
+ use Symfony \Component \Form \Extension \Core \Type \TextareaType ;
16
17
use Symfony \Component \Form \FormBuilderInterface ;
17
18
use Symfony \Component \OptionsResolver \OptionsResolver ;
18
19
@@ -40,7 +41,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
40
41
// $builder->add('content', null, ['required' => false]);
41
42
42
43
$ builder
43
- ->add ('content ' )
44
+ ->add ('content ' , TextareaType::class, [
45
+ 'help ' => 'Comments not complying with our Code of Conduct will be moderated. ' ,
46
+ ])
44
47
;
45
48
}
46
49
Original file line number Diff line number Diff line change @@ -48,14 +48,17 @@ public function buildForm(FormBuilderInterface $builder, array $options)
48
48
'label ' => 'label.title ' ,
49
49
])
50
50
->add ('summary ' , TextareaType::class, [
51
+ 'help ' => 'Summaries can \'t contain Markdown or HTML contents; only plain text. ' ,
51
52
'label ' => 'label.summary ' ,
52
53
])
53
54
->add ('content ' , null , [
54
55
'attr ' => ['rows ' => 20 ],
56
+ 'help ' => 'Use Markdown to format the blog post contents. HTML is allowed too. ' ,
55
57
'label ' => 'label.content ' ,
56
58
])
57
59
->add ('publishedAt ' , DateTimePickerType::class, [
58
60
'label ' => 'label.published_at ' ,
61
+ 'help ' => 'Set the date in the future to schedule the blog post publication. ' ,
59
62
])
60
63
->add ('tags ' , TagsInputType::class, [
61
64
'label ' => 'label.tags ' ,
Original file line number Diff line number Diff line change 28
28
{{ form_errors(form .content ) }}
29
29
30
30
{{ form_widget(form .content , {attr : {rows : 10 }}) }}
31
+ {{ form_help(form .content ) }}
31
32
</div >
32
33
33
34
<div class =" form-group" >
You can’t perform that action at this time.
0 commit comments