Skip to content

Commit d0a426d

Browse files
authored
Update frontend-forms.md (#1255)
Correction => syntax and structure errors in addField
1 parent cfd1191 commit d0a426d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

dev/documentation/3.3/en/frontend-forms.md

+9-9
Original file line numberDiff line numberDiff line change
@@ -189,14 +189,14 @@ HookRegistry::register('Form::config::before', function($hookName, $form) {
189189

190190
$form->removeField('subjects');
191191

192-
$form->addField(new \PKP\components\forms\FieldSelect('subjects') {
193-
'label' => __('common.subjects'),
194-
'isMultilingual' => true,
195-
'options' => [
196-
['value' => 'geology', 'label' => __('subject.geology'),
197-
['value' => 'physics', 'label' => __('subject.physics'),
198-
],
199-
});
192+
$form->addField(new \PKP\components\forms\FieldSelect('subjects', [
193+
'label' => __('common.subjects'),
194+
'isMultilingual' => true,
195+
'options' => [
196+
['value' => 'geology', 'label' => __('subject.geology')],
197+
['value' => 'physics', 'label' => __('subject.physics')],
198+
],
199+
]));
200200

201201
return false;
202202
}
@@ -281,4 +281,4 @@ The UI Library includes an example of [conditional display](/dev/#/component/For
281281

282282
---
283283

284-
Learn about another complex component, [ListPanels](./frontend-list-panels), in the next section.
284+
Learn about another complex component, [ListPanels](./frontend-list-panels), in the next section.

0 commit comments

Comments
 (0)