Hello.

Although the OJS – Open Journal Systems is the most widely used peer-reviewed academic journal system in the world, there is no phone number field in the basic registration form template. (I guess because phone numbers are more important than e-mail addresses for the security and protection of personal information.)

However, in some cases, a journal manager or editors may want to contact site members not only by e-mail but also by telephone. In this case, it is necessary to add a “Phone Number” field by making changes in the OJS registration form.

Although the process of adding a Phone Number to the OJS Registration Form varies from version to version, an example for OJS 3.3 will be shown below.

In order to add a Phone Number to the OJS Registration Form, we will need to make changes in 3 fields in 2 files. In order to perform the following operations, hosting or server ftp/cpanel login information is required.

ADDING PHONE NUMBER TO OJS REGISTRATION FORM

1.
Open lib/pkp/classes/user/form/ RegistrationForm.inc.php
Find where the line “function readInputData ( )” is. Add ‘phone’ to the list of registration information below these lines. As in the picture below:
2.
In the same file find the line
// Set the base user fields (name, etc.).
 Add the following codes right after this statement.
$user->setPhone($this->getData(‘phone’));
3. 
We will make the third change in the lib/pkp/templates/frontend/components/ registrationForm.tpl file.
Where you want the phone number field to appear is important, but in this example we’re adding it above the Country field.
For this, let’s add the following codes above the “<div class=”country”>” lines in the relevant file .
<div class=”form-group phone”>
<label>
<span class=”label”>
{translate key=”user.phone”}
<span class=”form-control-required”>*</span>
<span class=”sr-only”>{translate key=”common.required”}</span>
</span>
<input class=”form-control” type=”text” name=”phone” id=”phone” value=”{$phone|escape}” required>
</label>
</div>
That is all. Let’s save the files and check if the change we made worked.
If you have not made any mistakes, the phrase “Tel” and the phone number adding field will appear in the OJS Registration Form field.
RESULT IMAGES

Image in Registration Form

Display in User Profile Area

Editor Panel Users & Roles List, Edit Member Page

 

I hope it was useful.
You can write to us about OJS Installation, OJS Update, OJS Hosting, OJS Support etc. and get detailed information about our services.
Always consult an expert on the subject…
Save both time and money…

Comments are closed

0
    0
    Your Cart
    Your cart is emptyReturn to Shop