You are viewing the PKP Support Forum | PKP Home Wiki

email address field

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, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
The Public Knowledge Project Support Forum is moving to http://forum.pkp.sfu.ca

This forum will be maintained permanently as an archived historical resource, but all new questions should be added to the new forum. Questions will no longer be monitored on this old forum after March 30, 2015.

email address field

Postby mar » Mon Nov 12, 2012 5:21 am

Good morning,
is it possibile to make the email address field as NOT required ?

thank you
Posts: 17
Joined: Mon Jul 09, 2012 4:40 am

Re: email address field

Postby JasonNugent » Mon Nov 12, 2012 7:27 am

Hi mar,

On which form? For submissions, this can be accomplished by editing the templates to remove any client-side validation from the fields, and then also editing the Form PHP classes which process them in order to remove any Validators that have been added to certain fields for server-side validation and requirement. You might have problems later on for things like exporting records with the NativeImportExportPlugin and there may be locations where email addresses are assumed to have been provided when emails to authors are sent during the review process. So, it can be done, but it isn't entirely trivial or without consequence.

Site Admin
Posts: 910
Joined: Tue Jan 10, 2006 6:20 am

Re: email address field

Postby mar » Mon Nov 12, 2012 9:26 am

Thank you Jason,
I'd need it in Import/Export Data/QuickSubmit form becuase when I uplod 'old' items, sometimes, the email address is unknown.


Posts: 17
Joined: Mon Jul 09, 2012 4:40 am

Re: email address field

Postby springday » Wed Nov 14, 2012 2:56 am

Hi Mar,

if you import XML data of older articles and don't have e-mail addresses of the authors, the easiest trick is to add dummy email-addresses. I usually go with

Code: Select all
<email> </email>

(i.e. using a space character as a replacement for the missing email address)

This way you don't have to modify OJS code but get your article data submitted nevertheless. (I don't know if this trick works on quick submit forms, too. Probably it isn't working, because the form validator might require an email address to have at least an "@"-sign.)

How are you generating your XML input files that you are uploading? If you are using XSLT somewhere in the process, you could add a processing rule like this:

Code: Select all
        <xsl:when test="not({CHECK_FOR_EMAIL_ADDRESS_IN_SOURCE_DATA})"><xsl:text> </xsl:text></xsl:when>
        <xsl:otherwise><xsl:value-of select="{SELECT_EMAIL_ADDRESS_FROM_SOURCE_DATA}"/></xsl:otherwise>

Best regards,
Kai Weber
Posts: 111
Joined: Wed Jul 25, 2012 2:56 pm
Location: Munich, Germany

Return to OJS Technical Support

Who is online

Users browsing this forum: Yahoo [Bot] and 4 guests