Hi @asmcher !
One question: there’s a plugin that I can use to add custom metadata fields to the submission form? I need three fields for the user to store the name, university and degree of an article author. I have followed this post:
i check in the database and user profile too, but nothing is saved there.
I added two fields to step3.tpl: nationality and document (CPF for brazilian, passaport for foreigners).
I added these lines to AuthorSubmitStep3Form:
$this->addCheck(new FormValidatorArray($this, 'authors', 'required', 'author.submit.form.documentRequired', array('document')));
$this->addCheck(new FormValidatorArrayCustom($this, 'authors', 'required', 'author.submit.form.cpfInvalid', 'validateCPF', array(), false, array('document')));
...
function initData() {
...
'nationality' =>…
@asmecher , thanks, that was helpful—
For anyone else looking to add custom metadata (in the most minimal kind of way—this doesn’t tie in with the translation system, DC, etc.), here is what you need to modify:
In lib/pkp/classes/submission/PKPSubmissionMetadataFormImplementation.inc.php:
In the initData function, add 'myField' => $submission->getData('myField', null) to the formData var
In readInputData, add 'myField' to the userVars var
In getLocaleFieldNames, add 'myField' to the array (no…
but nothing changes on my templates. I’m using OJS 3.1.0.1
Can you help me? Please. I’m struggle with this for like two weeks.