You are viewing the PKP Support Forum | PKP Home Wiki

Form Validation Custom

Are you responsible for making OCS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, michael, John

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.

Form Validation Custom

Postby hksatay » Wed Aug 22, 2007 3:34 am

If user checked register as reviewer, then i would like to know he checked the checkbox e.g. <input type="checkbox" name="dinner" id="dinner" value="1" /> or not in CreateAccountForm.inc.php
As I knew that there is a FormValidatorCustom and i can check the value of "createAsReviewer", but, can i do the following logic?

Before form submission,
If user is checked as reviewer
then, check the checkbox of 'dinner' is checked or not?

Posts: 10
Joined: Wed Aug 22, 2007 3:17 am

Re: Form Validation Custom

Postby asmecher » Wed Aug 22, 2007 8:02 am

Hi hksatay,

Yes, the FormValidatorCustom is probably the best one to use. There are a few examples of its use in OCS that might be helpful:
  • classes/admin/form/ConferenceSiteSettingsForm.inc.php, to ensure that the supplied conference path is not already in use
  • classes/install/form/InstallForm.inc.php, to ensure that the two supplied passwords match
  • ...etc.
Alec Smecher
Public Knowledge Project Team
Posts: 10015
Joined: Wed Aug 10, 2005 12:56 pm

Return to OCS Technical Support

Who is online

Users browsing this forum: No registered users and 2 guests