2
Home LEM .NET Joomla! PHP System administration

How to Add Custom Fields to User Registration Form in Joomla

Embed Size (px)

DESCRIPTION

How to add new and custom fields to user registration field in a Joomla website.

Citation preview

Page 1: How to Add Custom Fields to User Registration Form in Joomla

5/18/2014 L O G I C Library - Joomla! 3: how to add custom fields to user registration form

http://library.logicsistemi.it/en/joomla/general-topics/93-joomla-3-how-to-add-custom-fields-to-user-registration-form 1/3

LOGIC Library

This site is the Logic involvement in sharing expertise and skills acquired in daily work. The goal is to

create a solid knowledge base and share best practices in software development and systems

management.

More info about us can be found on logicsistemi.it.

Joomla! > General topics > Joomla! 3: how to add custom fields to user registration form

Joomla! 3: how to add custom fields to userregistration formParent Category: Joomla!

Category: General topics

Created on Wednesday, 28 August 2013 12:14

Written by The Logic Team

More than a year ago I wrote a tutorial that explained how to write a plugin to add fields to the Joomla! 2.5 user registration

form.

A year later the Joomla! 3 version is widely used and it's time to update my tutorial to make it work with the new version.

What has changed

We are lucky. The plugin written for the 2.5 version works right with the new platform without any change!

In details:

The plugin events used in the previous tutorial, onContentPrepareData, onContentPrepareForm, onUserAfterSave and

onUserAfterDelete are unchanged with the new version

The database table used to store this information, #__user_profiles, is unchanged

Joomla! objects and methods used haven't changed

So the easy way to create the new Joomla! 3 plugin is the following:

Read the Joomla! 2.5: extending users' data with custom fields

Read the tutorial that explains how to preserve values when server side validation fails

Read how to validate the additional fields

Download the Joomla! 2.5 complete plugin and install it in your Joomla! 3 website.

If you are a perfectionist

If you are writing your own plugin and you are using features that only Joomla! 3 supports, you have to modify the Joomla!

version in the manifest file.

So open the testprofile.xml file and change the row

<extension version="2.5" type="plugin" group="user">

Database Diagram (ERD)datanamic.com

Database Design & Modeling: Get: DeZign for Databases : $129

Home LEM .NET Joomla! PHP System administration

Page 2: How to Add Custom Fields to User Registration Form in Joomla

5/18/2014 L O G I C Library - Joomla! 3: how to add custom fields to user registration form

http://library.logicsistemi.it/en/joomla/general-topics/93-joomla-3-how-to-add-custom-fields-to-user-registration-form 2/3

Quote

Quote

Quote

Quote

with the following

<extension version="3.0" type="plugin" group="user">

With 3.0 you will cover all Joomla! 3.x versions.

Enjoy it!

0 Tweet 0

Comments

#1 Dennis 2013-12-10 08:15

Hey guys good post and useful for us

#2 web2sign 2014-02-07 07:32

Thanks for the plugin! It solve my problem

#3 Werni 2014-03-11 11:45

Super tool, just what I need.

New fields are automaticaly marked as 'required'. How may I have them 'not required'?

There may I change the size of a field?

Thanks for answers

#4 Joppo 2014-05-10 11:41

Hi,

Great post, thnx (!)

For my application I want to register a new user with a new usergroup, where the name of the usergroup is in the

submitted form; Any suggestions how to extend your plugin to do this? (I'm just a beginner with respect to Joomla

coding)

thnx for the answers...

Refresh comments list

RSS feed for comments to this post

Add comment

Name (required)

E-mail (required, but will not display)

Notify me of follow-up comments

Refresh

Share

► Joomla 1.5 ► Joomla User ► Joomla Form ► Joomla XML