Add custom fields to registration form in Joomla

Finally after long time of search for a solution in how to add custom fields to registration form in Joomla i think there where no solution except change in main core of  joomla but i created a solution by myself i hope it can help you:

1- Download the Chronoforms_V4_RC3.5.2.5_J3.0 Joomla componant from here

2- create a Custome Form you want to be your registration form and click on Forms manger to show the link for front end view

3- Now you need to add the custome field to Database as columns to add the data in form this can do by open database then the users tabel(#__users) and add the fields you need and its type

4- now all you need to add data to 2 tables in database (#__users) and (#__user_usergroup_map ) and you can do this by add some lines of code to 2 functions in the plugin as following:

4.1- open the file : <You project Work space >/components/com_chronoforms/libraries/chronoform.php

4.2-(Note: if you want to add Password Field only use this point) Search for function _set_form_data() add the following lines of code if you want to add password as it is encrypted by MD5 + salt:

/* * Start */

$salt = JUserHelper::genRandomPassword(32); $crypt = JUserHelper::getCryptedPassword($this->data[“password”], $salt); $password = $crypt . ‘:’ . $salt; $this->data[“password”] = $password; /* * End */ 4.3- Search for function process($event = null) and add the following code after the line “$return = $this->_processEvents($event, $events[‘events’]);” /* * Start */ $db =& JFactory::getDBO(); $query = “INSERT INTO `#__user_usergroup_map` (user_id,group_id) VALUES (‘”.$this->data[“chronoform_data”][“id”].”‘, 2)”; $db->setQuery( $query ); $db->query();

/* * End */

Open article page in Frontend in joomla

You can open joomla aricle page direct in joomla by add this URL with some changes

http://Yoursitename/index.php/19-sample-data-articles/joomla/Article id in backendArticle Alias


1- go to backend – articles page

2- just hover the aricle and you will get somthing like that


3- copy id of article which is 188 in this example

4- get article Alise From article page details which is test_article  in our example

5- now you can make url to article page as following