diff --git a/resources/lang/en/fieldtypes.php b/resources/lang/en/fieldtypes.php index 130243a8be..6625bfe02a 100644 --- a/resources/lang/en/fieldtypes.php +++ b/resources/lang/en/fieldtypes.php @@ -115,6 +115,7 @@ 'replicator.title' => 'Replicator', 'revealer.title' => 'Revealer', 'revealer.config.mode' => 'Choose your preferred layout style.', + 'revealer.config.input_label' => 'Set a label to be shown in the button or beside the toggle.', 'section.title' => 'Section', 'select.config.clearable' => 'Enable to allow deselecting your option.', 'select.config.multiple' => 'Allow multiple selections.', diff --git a/src/Fieldtypes/Revealer.php b/src/Fieldtypes/Revealer.php index 193cc5c491..9911ab5a05 100644 --- a/src/Fieldtypes/Revealer.php +++ b/src/Fieldtypes/Revealer.php @@ -23,6 +23,14 @@ protected function configFieldItems(): array 'toggle' => __('Toggle'), ], 'default' => 'button', + 'width' => 50, + ], + 'input_label' => [ + 'display' => __('Input Label'), + 'instructions' => __('statamic::fieldtypes.revealer.config.input_label'), + 'type' => 'text', + 'default' => '', + 'width' => 50, ], ]; }