1

I am working with joomla 1.7.I want to extend registration fields or add custom fields without modifying core files. In future i will be upgrade to new version, it's not affect the changes. can anyone please help me?

6 Answers 6

2

VERY SIMPLY:

Activate the built-in 'User - Profile' plugin and configure (J1.6+ only). This adds lots of extra fields to the registration form and user profiles. You may need to modify the language file for the plugin to change some of the field names to suite.

1

It's not too hard - and there's no need to hack the core. One of the really cool things about 1.6+ is that extending the registration fields is relatively easy.

Here's one source: http://www.joellipman.com/articles/web-development/joomla-cms/28-tutorials/499-creating-a-profile-plugin-for-joomla-16.html

Another way (which is sort of the same) is to go into plugins/user. In there should be a folder called "profile"

  • Copy it and call it something different...say yourprofile
  • Open up the files with your text editor and change the references so it references "yourprofile" instead of "profile."
  • Edit the PHP and XML files so you only are adding the fields you want but you can use what's there to model what you want to accomplish (eg, need a select field? Rename theirs and delete the others)
  • Install it (either use "Discover", or throw it in the tmp folder and install from tmp, or zip it and upload it) and enable it.
  • Curse that there's an error because you missed something, go back and change
  • Repeat
  • And done!

One caveat - what doesn't seem to be working with this method is a way of forcing a particular field to be required. There is a patch in joomlacode but I couldn't get it working and many others seemed to have problems too (though others say it worked fine).

1

You may use a copy of the core files you need to hack and save them to your template. That is nothing else but the famous "template overrides". When you do it, you don't loose your hacks when you upgrade Joomla. Have a look at http://docs.joomla.org/How_to_override_the_output_from_the_Joomla!_core and at http://docs.joomla.org/Understanding_Output_Overrides. Hope it's helpfull.

1
  • Welcome to SO! Answers should contain essential parts of a link, as links can break and no longer be accesable.
    – hichris123
    Nov 29, 2013 at 20:45
0

This is one of those questions a lot of people ask about Joomla. Extending the registration fields is not a simple thing. You could hack the core code, but that's not a great idea.

There are extensions in the Jomla Extension Directory that can help you. Another way to go is to install Seblod, a CCK which which allows you to extend all fields/forms in Joomla (http://www.seblod.com).

0

I haven't used this extension, but it looks like it will extend your registration and allow custom fields without modifying joomla core files.

It is also compatible with Joomla 1.7 and 2.5 so you will have no trouble upgrading.

http://extensions.joomla.org/extensions/access-a-security/site-access/authentication/14303

0

If you want to save the new data to the users table, it's easy:

Edit administrator/components/com_users/models/forms/user.xml and add your new fields, then modify the database so that the users table can accept the new data. That's it.

Customized registration is more difficult. As a starting point, create a plugin and look up the "onUser" functions.

Load the plugin by going to (administrator)->Extensions->Manage->install from directory , then activate it by going to (administrator)->Extensions->Plugins->(choose yours)->Enable

Use onUserAfterSave() to save information, and onContentPrepareData() to load it. For example: onContentPrepareData would set $data->yourNewField , and onUserAfterSave would get $user['yourNewField'] and store it to a database (or whatnot).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.