Skip to content

Commit

Permalink
Update frontend-forms.md (#1255)
Browse files Browse the repository at this point in the history
Correction => syntax and structure errors in addField
  • Loading branch information
LSS-commits authored Nov 5, 2024
1 parent cfd1191 commit d0a426d
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions dev/documentation/3.3/en/frontend-forms.md
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,14 @@ HookRegistry::register('Form::config::before', function($hookName, $form) {

$form->removeField('subjects');

$form->addField(new \PKP\components\forms\FieldSelect('subjects') {
'label' => __('common.subjects'),
'isMultilingual' => true,
'options' => [
['value' => 'geology', 'label' => __('subject.geology'),
['value' => 'physics', 'label' => __('subject.physics'),
],
});
$form->addField(new \PKP\components\forms\FieldSelect('subjects', [
'label' => __('common.subjects'),
'isMultilingual' => true,
'options' => [
['value' => 'geology', 'label' => __('subject.geology')],
['value' => 'physics', 'label' => __('subject.physics')],
],
]));

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

---

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

0 comments on commit d0a426d

Please sign in to comment.