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
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.
Is it possible to customize the user registration template by adding an additional field? We would like to add an additional field below Affiliation for Department as well as add some additional instructions. If this is possible, can you tell me where the template is located?
- Posts: 16
- Joined: Thu Jan 16, 2014 2:01 pm
The templates for user registration are located in templates/user/register.tpl. Adding a field requires more than just adding the field to the template, though. You'll need to modify the PHP form class in classes/user/form/RegistrationForm.inc.php and add the necessary bits and pieces to readInputData() and possibly any form validation checks if you want the field to be required or not. Finally, you'll need to add some get() and set() methods to the classes/user/User.inc.php and UserDAO classes to make those fields accessible if you want to use that data in other places.
Give it a try and see how far you get.
- Site Admin
- Posts: 910
- Joined: Tue Jan 10, 2006 6:20 am
Return to OJS Technical Support
Who is online
Users browsing this forum: Google [Bot], Yahoo [Bot] and 3 guests