Problem:
you need to add a new field on joomla user registration process, like a flag to confirm newsletter subscription
Solution:
This is actually really simple.
open your joomla database in your db manager. I generally do this in "PHPMYADMIN".
From there open the table "jos_users" and then add your additional fields that you require.
Then you go into libraries/joomla/database/table/user.php and declare you variables. So if you added a country field then you declair the varible like so:
var $Country = null;
The next step in the process is editing the actual registration form. This is done by going to components/com_user/views/register/tmpl/default.php.
On some joomla reales there is important to edit diferent files, here is a list of the folder where you can find layouts to edits.
- administrator/components/com_user/views/user/tmpl/
- component/com_user/views/user/tmpl
- components/com_user/views/register/tmpl/ libraries/joomla/database/table/
- template/xxx/html/com_user/register/
- template/xxx/html/com_user/user
More information:
- http://www.youtube.com/watch?v=dk_86nHu3AM
- Information about checkboxes
- http://board.phpbuilder.com/showthread.php?10374851-Populating-HTML-checkboxes-from-a-database
- About radiobuttons
- http://www.echoecho.com/htmlforms10.htm