Skip to content

Commit cf2cb51

Browse files
committed
config option help_block_tag
1 parent e600ea0 commit cf2cb51

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/Kris/LaravelFormBuilder/Fields/FormField.php

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -536,9 +536,11 @@ private function allDefaults()
536536
return [
537537
'wrapper' => ['class' => $this->getConfig('defaults.wrapper_class')],
538538
'attr' => ['class' => $this->getConfig('defaults.field_class')],
539-
'help_block' => ['text' => null, 'tag' => 'p', 'attr' => [
540-
'class' => $this->getConfig('defaults.help_block_class')
541-
]],
539+
'help_block' => [
540+
'text' => null,
541+
'tag' => $this->getConfig('defaults.help_block_tag', 'p'),
542+
'attr' => ['class' => $this->getConfig('defaults.help_block_class')],
543+
],
542544
'value' => null,
543545
'default_value' => null,
544546
'label' => null,

src/config/config.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
'field_error_class' => '',
1010
'help_block_class' => 'help-block',
1111
'error_class' => 'text-danger',
12-
'required_class' => 'required'
12+
'required_class' => 'required',
13+
14+
'help_block_tag' => 'p',
1315

1416
// Override a class from a field.
1517
//'text' => [

0 commit comments

Comments
 (0)