Software Hosting and Development Services available at PKP Publishing Services
As the developers of Open Journal Systems, Open Conference Systems, Open Harvester Systems, and Open Monograph Press, the PKP team are experts in helping journal managers and conference organizers make the most of their online publishing projects. PKP Publishing Services offers support for:
As a customer of PKP Publishing Services, you will not only receive direct, personalized support from the PKP Development Team, but will be contributing to the ongoing development of the PKP applications. All funds raised by PKP Publishing Services go directly toward enhancing our free, open source software. For more information, please contact us.
Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.
Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher
Forum rules
What to do if you have a technical problem with OJS:1.
Search the forum. You can do this from the
Advanced Search Page or from our
Google Custom Search, which will search the entire PKP site. If you are encountering an error, we
especially recommend searching the forum for said error.
2.
Check the FAQ to see if your question or error has already been resolved.
3.
Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the
OJS Editorial Support and Discussion subforum; if you have a development question, try the
OJS Development subforum.
by aleskl » Fri Feb 01, 2013 5:52 am
Hello!
I would like to make the text field "Comments for the editor" required in paper submission Step 1. I added required="true" to the label of the field, which shows an asterisk by the field label, but I'm lost how to actually check this field for content. I did search the forum, found some instructions for form checking, but I don't know how to apply this to the submission template "step1.tpl"?
Cheers,
Ales
-
aleskl
-
- Posts: 67
- Joined: Mon Apr 11, 2011 7:08 am
by JasonNugent » Fri Feb 01, 2013 7:09 am
Hi Ales,
The validation is done server side, in the Form class that handles that particular form. In your case, you'd want to edit classes/author/form/submit/AuthorSubmitStep1Form.inc.php and look in the constructor at the top of the form. You'll see a few calls to $this->addCheck() where a few FormValidator objects are passed. You'd have to add one for the field you want to make required (and probably also a locale key for the message you want to display if it is left blank).
Regards,
Jason
Software Developer, Public Knowledge Project
-
JasonNugent
-
- Posts: 475
- Joined: Tue Jan 10, 2006 6:20 am
by aleskl » Mon Feb 04, 2013 3:15 am
Thank you Jason!
Your instructions were most helpful, I managed to enable the checking of Comments to the Editor in the classes/author/form/submit/AuthorSubmitStep1Form.inc.php. I added
- Code: Select all
$this->addCheck(new FormValidator($this, 'commentsToEditor', 'required', 'author.submit.comments'));
For the error message I just used the modified text from the locale that goes with this field.
We use this field to enter the cover letter that is obligatory for the submission, so the checking of this is important. Thank you!
-Ales
-
aleskl
-
- Posts: 67
- Joined: Mon Apr 11, 2011 7:08 am
Return to OJS Technical Support
Who is online
Users browsing this forum: makouvlei and 4 guests