[OJS] Affiliation and Keywords become required

Is it possible to make the insertion of keywords and affiliations required in user profiles?


Thanks for help.


Hi @Tiziano,

Affiliation is mandatory for the registration process. Can you describe the problem in more details? Are you talking about the metadata page, where authors can add contributors for their submissions?

Hi @Vitaliy,
precisely, for our journal, I should make it mandatory to affiliate in metadata submissions and keywords. Do you have any suggestions for me?

Thnaks for help.


Keywords can be set as mandatory from a dashboard → Workflow SettingsSubmission Metadata

For the affiliation the task is rather complex and require making code modifications. I’d start to look at lib/pkp/templates/common/userDetails.tpl: https://github.com/pkp/pkp-lib/blob/master/templates/common/userDetails.tpl#L141-L143 where you need to add required="true" for that input field.
The next step would be inspecting correspondent form class to add a validation check, like: https://github.com/pkp/pkp-lib/blob/master/controllers/grid/users/author/form/AuthorForm.inc.php#L54
for affiliation. I’m not sure what validation class should be used there. Probably FormValidatorLocale but I’m not sure.

The last thing is that for the sake of support I wouldn’t make any changes to the core files but rather injected the code from the child theme. You can always override template from a theme plugin and inject a code through a hooks in a Form class (in this case inside a constructor call). Does it make sense?