How to add a free textbox to the submission form?

I am looking for a way to add a text box to the manuscript submission form. We allow authors to suggest potential reviewers for their manuscript by adding their names and contact details in the ‘comments to the editor’ box during submission. Unfortunately, only few make use of this. To draw their attention to this possibility, we would like to include an additional text box into the submission form, which should come with a title (‘Reviewer suggestion’) and should be voluntary to fill out. Its content should later be displayed on the summary page of the manuscript.

Is there a possibility to do this? If not, this would also be a nice feature for OJS 3.

Hi Heike,

Adding a text field will require some custom coding. Generally, the process to do this requires an addition to the .tpl template file for the specific form you wish to modify, a few modifications to the PHP form class file which represents the form itself, and maybe a modification or two to the DAO class for submission objects in order to have this field stored in the database. You would also need to then modify the .tpl file and the appropriate PHP classes to include that field for display at the end of the submission process.

If you want to tackle the work I can provide more in depth instructions.

Regards,
Jason

Hi Jason,

thank you for this description. I fear, this is beyond my expertise then.

Best regards,
Heike

@heike_riegler We’re a team using OJS to manage our publications. We intend adding this feature to the author submission stage too. Our first publication has delayed because of the difficulty finding suitable reviewers for authors submissions. I’ve a level of expertise in coding. So will seek help from @jnugent

Hi @jnugent, thank you for the brief. I really like to tackle this feature in our system and also make it public to the community after successful implementation. I’m the only developer on our team (with PHP knowledge) I’ll be glad to receive the more in-depth instructions.

Regards,
Emmanuel

Hi Jason,
When you say “some custom coding” are you referring to making custom plugin written to satisfy this point (eg. “add a free textbox”)? Or is this in reference to changing the submission class in the core of OJS to add form elements, storage for that data, and display / use of that data?

All the best,

Shawn

hi Shawn,

You could actually do it both ways, I suppose. The easier way is to modify
the core classes and add the necessary bits to the form class, object class
for accessor methods, and the templates. But you could also do it with a
plugin and extend from the hooks that let you add new metadata to the
submission. That way is a bit more work but it would be more portable when
upgrading OJS.

Cheers,
Jason

Thanks, Jason!
Has anyone, to your knowledge, used the hooks to add to the submission form? I’m having a hard time finding documentation for how to use the OJS hooks; and moreso of a hard time finding examples of plugins that use hooks.

All the best,

Shawn

Hi Shawn

Sure. Most of the external id plugins like the DOI plugin work this way.

Cheers
Jason

HI @jnugent, @asmecher,

I was working on something similar. (OJS version 3.1.2.1 (June 24, 2019 - 11:54 AM))

I want to add one more table to the submission form as shown in the image belowsubmissions

I’ve modified the ojs/lib/pkp/templates/submission/form/step3.tpl to show the form.

I’m confused about which class should I do the modifications to the Submission and DAO classes. Please guide me to the files I need to change.

If anyone did something similar please share the code.

Thanks in advance.

Kind Regards,
Aditya

Hello @EPrempeh,
Did you manage tO add text box to the form.
If yes, could you please share the code.

Thanks.
Adi

Hi @gosunrisers,

Can you describe the kind of information you’re looking to store? The best approach will depend on the details of the information.

Regards,
Alec Smecher
Public Knowledge Project Team