Change field "Comments for the Editor"

Hi,

I would like to make a change in Step 1 of the form for submit articles.

Specifically, I want to change the “Comments for the Editor” field, which is text field, for a combo box with three options.

How can I do it?

Thank you.

José

Hi @josegovia,

You will have to change the template templates/author/submit/step1.tpl. If the field name stays the same (‘commentsToEditor’) and the field value is still a string, as till now, then I suppose you will not have to change anything else.

Best!
Bozana

Thank you.

From your comment, I understand that changing the “textarea” for “select” (and their options) is sufficient.

How I can do this field mandatory?

A greeting

José

I also need to change the label, for English and Spanish.

And I’ve seen in the SELECT of JOURNAL SECTION, the SELECT options come from {html_options options = $ sectionOptions selected = $ sectionId}

Which file have to be modified to add the options of the new SELECT?

Thanks

José

Hi @josegovia,

The sectionOptions and sectionId are assigned to the template in classes/author/form/submit/AuthorSubmitStep1Form.inc.php (s. display and init function).

In order to make the new field required, you will have to add a new FormValidator in the constructor AuthorSubmitStep1Form (similar to the one for the sectionId).

The labels are defined in locale/en_US/author.xml and locale/es_ES/author.xml.
There is a Custom Locale plug-in, that you could use for that, but because you will probably have to add a new key for the error message displayed if the field is empty, maybe it doesn’t matter if you make the changes directly to the files. – All changes that you make, you will have to consider again when upgrading the system :frowning:

You could eventually implement a plug-in that inserts a new form field (similar to the OpenAIRE plugin) – this would be easier to maintain – but in that case you will not be able to remove the current comment field.

Best!
Bozana

Is there a plugin that lets you add new fields?

Thank you so much for all your help.

Finally I decided to use the OpenAIRE plugin to add the field.

Now everything works, but I can not delete the validation of 6 numeric characters.

How can I change this validation rule to simply make the field required and allow a string of any size?

Thank you.

Hello again Bonza.

My attempts to create a plugin have not worked, so I decided to change the field “Comments to the Editor”.

I modified in templates/author/submit/step1.tpl code:

<table width="100%" class="data">
<tr valign="top">
	<td width="20%" class="label">{fieldLabel name="commentsToEditor" key="author.submit.comments"}</td>
	<td width="80%" class="value"><textarea name="commentsToEditor" id="commentsToEditor" rows="3" cols="40" class="textArea">{$commentsToEditor|escape}</textarea></td>
</tr>
</table>

by

<table width="100%" class="data">
<tr valign="top">
	<td width="20%" class="label">{fieldLabel name="commentsToEditor" required="true" key="author.submit.comments"}</td>
	<td width="80%" class="value"><select name="commentsToEditor" id="commentsToEditor" size="1" class="selectMenu">
    	<option value="ComunicacionOral">Comunicación oral</option>
  		<option value="Poster">Póster</option>
  		<option value="Simposio">Simposio</option>
        <option value="ExpEducativas">Experiencias y buenas prácticas educativas</option>
  		<option value="ComunicacionVirtual">Comunicacion virtual (sólo para congreso virtual)</option></select></td>
</tr>
</table>

But when I test the page, the ComboBox does not appear and the text box still appears, showing the first option of SELECT.

Do you know what can be wrong?

Thank you

José

Ah, this field is considered in the TinyMCE plug-in i.e. you will have to comment out that line in the plugin: ojs/TinyMCEPlugin.inc.php at ojs-stable-2_4_8 · pkp/ojs · GitHub

Sorry, I didn’t think about that… :-\

Thank you.

Now if it works correctly.

Our installation is shared among many independent journals. Is it possible to modify the template as instructed above without affectign other journals, please?

Thanks,
-FGN.

@fgnievinski, no, I don’t think so – the changes will affect all journals in that installation…