File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 1313
1414use App \Entity \Comment ;
1515use Symfony \Component \Form \AbstractType ;
16+ use Symfony \Component \Form \Extension \Core \Type \TextareaType ;
1617use Symfony \Component \Form \FormBuilderInterface ;
1718use Symfony \Component \OptionsResolver \OptionsResolver ;
1819
@@ -40,7 +41,9 @@ public function buildForm(FormBuilderInterface $builder, array $options)
4041 // $builder->add('content', null, ['required' => false]);
4142
4243 $ builder
43- ->add ('content ' )
44+ ->add ('content ' , TextareaType::class, [
45+ 'help ' => 'Comments not complying with our Code of Conduct will be moderated. ' ,
46+ ])
4447 ;
4548 }
4649
Original file line number Diff line number Diff line change @@ -48,14 +48,17 @@ public function buildForm(FormBuilderInterface $builder, array $options)
4848 'label ' => 'label.title ' ,
4949 ])
5050 ->add ('summary ' , TextareaType::class, [
51+ 'help ' => 'Summaries can \'t contain Markdown or HTML contents; only plain text. ' ,
5152 'label ' => 'label.summary ' ,
5253 ])
5354 ->add ('content ' , null , [
5455 'attr ' => ['rows ' => 20 ],
56+ 'help ' => 'Use Markdown to format the blog post contents. HTML is allowed too. ' ,
5557 'label ' => 'label.content ' ,
5658 ])
5759 ->add ('publishedAt ' , DateTimePickerType::class, [
5860 'label ' => 'label.published_at ' ,
61+ 'help ' => 'Set the date in the future to schedule the blog post publication. ' ,
5962 ])
6063 ->add ('tags ' , TagsInputType::class, [
6164 'label ' => 'label.tags ' ,
Original file line number Diff line number Diff line change 2828 {{ form_errors(form .content ) }}
2929
3030 {{ form_widget(form .content , {attr : {rows : 10 }}) }}
31+ {{ form_help(form .content ) }}
3132 </div >
3233
3334 <div class =" form-group" >
You can’t perform that action at this time.
0 commit comments