I have to put that keywords and references are mandatory fields. Please instruct me how to do that.
Thanks
I have to put that keywords and references are mandatory fields. Please instruct me how to do that.
Thanks
Hi @vvucic,
For the moment, thatâll require a template modification. See templates/submission/submissionMetadataFormFields.tpl
.
Regards,
Alec Smecher
Public Knowledge Project Team
OK. Thanks. Are there any other interrelated files that should be edited too?
Thanks
Hi @vvucic,
The corresponding form is implemented in PHP in lib/pkp/classes/submission/PKPSubmissionMetadataFormImplementation.inc.php
and classes/submission/.inc.php
. (SubmissionMetadataFormImplementation
extends PKPSubmissionMetadataFormImplementation
â the former is the OJS-specific extension of the latter, which is used by both OJS and OMP.) PKPSubmissionMetadataFormImplementation
has a function called addChecks
thatâs used to set up the required field checks on the server side.
Regards,
Alec Smecher
Public Knowledge Project Team
I am checking and editing those files but I do not get keywords and references marked with asterisk i.e mandatory.
If I put in /PKPSubmissionMetadataFormImplementation.inc.php this line after line 50
$this->_parentForm->addCheck(new FormValidatorLocale($this->_parentForm, âkeywordâ, ârequiredâ, âsubmission.submit.form.keywordRequiredâ));
I still do not get keywords mandatory
Please advise
Hi @vvucic,
The asterisk needs to be added by setting the required=true
attribute in the {fbvElement ...}
call that generates the field. Youâll find this in the template file.
Regards,
Alec Smecher
Public Knowledge Project Team
I defined that element like this in /templates/submission/submissionMetadataFormFields.tpl.:
{fbvElement type=âkeywordâ id=âlanguagesâ subLabelTranslate=true multilingual=true required=true current=$languages source=$languagesSourceUrl disabled=$readOnly}
and addedd in validation checks in lib/pkp/classes/submission/PKPSubmissionMetadataFormImplementation.inc.php
$this->_parentForm->addCheck(new FormValidatorLocale($this->_parentForm, âkeywordâ, ârequiredâ, âsubmission.submit.form.keywordRequiredâ))
I cleaned template cache but I still do not get it as mandatory.
What next I have to do? Do you define field for references as âreferencesâ or with different name?
Thanks
For indexing processes (Scielo, Latindex, etc.) there are several requirements that are mandatory. For that reason I think it would be very useful to be able to modify the mandatory fields.
Further guidance is possible.
@vvucic, could you get the expected modification of the fields?
Any help will be greatly appreciated!
Here is some related code that we just added during our code sprint.
Regards,
Alec Smecher
Public Knowledge Project Team
Thank you very much @asmecher ! ⊠I will wait for version 3.1 to see how it works.
Have a nice day!
Hi. I want to disable last name mandatory option of contributor.