How to add a required checkbox on the submission form?

howto
ojs3
ojs
#1

Hello again, pkp community.

I need to add a one checkbox on the submission form. One on the section below “Add Collaborator” I need to add a checkbox that says “I’ve already add all the Collaborators of this article” and I need to this checkbox to be required, otherwise the form cannot be submitted.

I need to add a sentence or an option within section “Add Collaborator” which says something like “If you aren’t registered on ORCID, please do it following the next link…” and I need to make that the ORCID number field to be required, otherwise the form cannot be submitted.

I have tried to change OJS forms and templates on previously attempts but with no success because my lack of knowledge on its workflow.

If you can tell me which files has to be modified, I will be very thankful.

#2

This will be some pretty involved PHP work.

Assuming OJS 3.1.2, the author submission step 3 form defers validation to the metadata form implementation. Those validation checks are added here:

You could presumably add a new validation check for a new checkbox at this point, though I’m not sure if you would want to add it to the metadata form implementation, or to this form itself.

The metadata template itself is called here, after which you might add the new checkbox:

For the ORCID IDs, the recommendation of ORCID is not to add unvalidated ORCID IDs. That is, the owner of the ORCID ID should use the application to link the ORCID ID within the application, using the orcid.org API - another user should not manually enter an ORCID on behalf of the ORCID ID owner. Substantial work has been done here via the orcidProfile plugin.