Skip to content

Instantly share code, notes, and snippets.

@sivaprabug
Last active August 29, 2015 13:57
Show Gist options
  • Save sivaprabug/9640710 to your computer and use it in GitHub Desktop.
Save sivaprabug/9640710 to your computer and use it in GitHub Desktop.
Joomla registration form add new fields
===========================================================
Find the below paths:-
/administrator/language/en-GB/en-GB.plg_user_profile.ini
/plugins/user/profile/profile.xml
/plugins/user/profile/profiles/profile.xml
===========================================================
/administrator/language/en-GB/en-GB.plg_user_profile.ini:-
; Joomla! Project
; Copyright (C) 2005 - 2013 Open Source Matters. All rights reserved.
; License http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL, see LICENSE.php
; Note : All ini files need to be saved as UTF-8
COM_CONTENT_CHANGE_ARTICLE="Select or Change article"
COM_CONTENT_CHANGE_ARTICLE_BUTTON="Select / Change"
COM_CONTENT_SELECT_AN_ARTICLE="Select an Article"
PLG_USER_PROFILE="User - Profile"
PLG_USER_PROFILE_FIELD_ABOUT_ME_DESC="Choose an option for the field About Me."
PLG_USER_PROFILE_FIELD_ABOUT_ME_LABEL="How did you hear about Towel?"
PLG_USER_PROFILE_FIELD_ADDRESS1_DESC="Choose an option for the field Address1"
PLG_USER_PROFILE_FIELD_ADDRESS1_LABEL="Address 1:"
PLG_USER_PROFILE_FIELD_ADDRESS2_DESC="Choose an option for the field Address2"
PLG_USER_PROFILE_FIELD_ADDRESS2_LABEL="Address 2:"
PLG_USER_PROFILE_FIELD_CITY_DESC="Choose an option for the field City"
PLG_USER_PROFILE_FIELD_CITY_LABEL="City:"
PLG_USER_PROFILE_FIELD_COUNTRY_DESC="Choose an option for the field Country"
PLG_USER_PROFILE_FIELD_COUNTRY_LABEL="Country:"
PLG_USER_PROFILE_FIELD_DOB_DESC="Choose an option for the field Date of Birth"
PLG_USER_PROFILE_FIELD_DOB_LABEL="Date of Birth:"
PLG_USER_PROFILE_FIELD_FAVORITE_BOOK_DESC="Choose an option for the field Favourite Book"
PLG_USER_PROFILE_FIELD_FAVORITE_BOOK_LABEL="Industry Identifier/Towel Account #"
PLG_USER_PROFILE_FIELD_NAME_PROFILE_REQUIRE_USER="User profile fields for profile edit form"
PLG_USER_PROFILE_FIELD_NAME_REGISTER_REQUIRE_USER="User profile fields for registration and administrator user forms"
PLG_USER_PROFILE_FIELD_PHONE_DESC="Choose an option for the field Phone"
PLG_USER_PROFILE_FIELD_PHONE_LABEL="Phone:"
PLG_USER_PROFILE_FIELD_POSTAL_CODE_DESC="Choose an option for the field Postal Code"
PLG_USER_PROFILE_FIELD_POSTAL_CODE_LABEL="Postal / ZIP Code:"
PLG_USER_PROFILE_FIELD_REGION_DESC="Choose an option for the field Region"
PLG_USER_PROFILE_FIELD_REGION_LABEL="State:"
PLG_USER_PROFILE_FIELD_TOS_ARTICLE_DESC="Select the desired Terms of Service article from the list"
PLG_USER_PROFILE_FIELD_TOS_ARTICLE_LABEL="Select TOS Article:"
PLG_USER_PROFILE_FIELD_TOS_DESC="Agree to terms of service"
PLG_USER_PROFILE_FIELD_TOS_LABEL="Terms of Service:"
PLG_USER_PROFILE_FIELD_WEB_SITE_DESC="Add Company Name here"
PLG_USER_PROFILE_FIELD_WEB_SITE_LABEL="Company Name:"
PLG_USER_PROFILE_FIELD_BUSINESS_TYPE_DESC="Choose Business Type"
PLG_USER_PROFILE_FIELD_BUSINESS_TYPE_LABEL="Business Type:"
PLG_USER_PROFILE_OPTION_AGREE="Agree"
PLG_USER_PROFILE_SLIDER_LABEL="User Profile"
PLG_USER_PROFILE_XML_DESCRIPTION="User Profile Plug-in"
===========================================================
/plugins/user/profile/profile.xml :-
===========================================================
<?xml version="1.0" encoding="utf-8"?>
<extension version="2.5" type="plugin" group="user">
<name>plg_user_profile</name>
<author>Joomla! Project</author>
<creationDate>January 2008</creationDate>
<copyright>(C) 2005 - 2013 Open Source Matters. All rights reserved.</copyright>
<license>GNU General Public License version 2 or later; see LICENSE.txt</license>
<authorEmail>admin@joomla.org</authorEmail>
<authorUrl>www.joomla.org</authorUrl>
<version>2.5.0</version>
<description>PLG_USER_PROFILE_XML_DESCRIPTION</description>
<files>
<filename plugin="profile">profile.php</filename>
<filename>index.html</filename>
<folder>profiles</folder>
</files>
<languages>
<language tag="en-GB">en-GB.plg_user_profile.ini</language>
<language tag="en-GB">en-GB.plg_user_profile.sys.ini</language>
</languages>
<config>
<fields name="params">
<fieldset name="basic"
addfieldpath="/administrator/components/com_content/models/fields">
<field name="register-require-user" type="spacer" class="text"
label="PLG_USER_PROFILE_FIELD_NAME_REGISTER_REQUIRE_USER"
/>
<field name="register-require_address1" type="list"
description="PLG_USER_PROFILE_FIELD_ADDRESS1_DESC"
label="PLG_USER_PROFILE_FIELD_ADDRESS1_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="register-require_address2" type="list"
description="PLG_USER_PROFILE_FIELD_ADDRESS2_DESC"
label="PLG_USER_PROFILE_FIELD_ADDRESS2_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="register-require_city" type="list"
description="PLG_USER_PROFILE_FIELD_CITY_DESC"
label="PLG_USER_PROFILE_FIELD_CITY_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="register-require_region" type="list"
description="PLG_USER_PROFILE_FIELD_REGION_DESC"
label="PLG_USER_PROFILE_FIELD_REGION_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="register-require_country" type="list"
description="PLG_USER_PROFILE_FIELD_COUNTRY_DESC"
label="PLG_USER_PROFILE_FIELD_COUNTRY_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="register-require_postal_code" type="list"
description="PLG_USER_PROFILE_FIELD_POSTAL_CODE_DESC"
label="PLG_USER_PROFILE_FIELD_POSTAL_CODE_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="register-require_phone" type="list"
description="PLG_USER_PROFILE_FIELD_PHONE_DESC"
label="PLG_USER_PROFILE_FIELD_PHONE_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="register-require_website" type="list"
description="PLG_USER_PROFILE_FIELD_WEB_SITE_DESC"
label="PLG_USER_PROFILE_FIELD_WEB_SITE_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="register-require_businesstype" type="list"
description="PLG_USER_PROFILE_FIELD_BUSINESS_TYPE_DESC"
label="PLG_USER_PROFILE_FIELD_BUSINESS_TYPE_LABEL">
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="register-require_favoritebook"
type="list"
label="PLG_USER_PROFILE_FIELD_FAVORITE_BOOK_LABEL"
description="PLG_USER_PROFILE_FIELD_FAVORITE_BOOK_DESC"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field
name="register-require_aboutme"
type="list"
label="PLG_USER_PROFILE_FIELD_ABOUT_ME_LABEL"
description="PLG_USER_PROFILE_FIELD_ABOUT_ME_DESC"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field
name="register-require_tos"
type="list"
default="0"
label="PLG_USER_PROFILE_FIELD_TOS_LABEL"
description="PLG_USER_PROFILE_FIELD_TOS_DESC"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="0">JDISABLED</option>
</field>
<field
name="register_tos_article"
type="modal_article"
label="PLG_USER_PROFILE_FIELD_TOS_ARTICLE_LABEL"
description="PLG_USER_PROFILE_FIELD_TOS_ARTICLE_DESC"
/>
<field
name="register-require_dob"
type="list"
label="PLG_USER_PROFILE_FIELD_DOB_LABEL"
description="PLG_USER_PROFILE_FIELD_DOB_DESC">
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="spacer1" type="spacer"
hr="true"
/>
<field name="profile-require-user" type="spacer" class="text"
label="PLG_USER_PROFILE_FIELD_NAME_PROFILE_REQUIRE_USER"
/>
<field name="profile-require_address1" type="list"
description="PLG_USER_PROFILE_FIELD_ADDRESS1_DESC"
label="PLG_USER_PROFILE_FIELD_ADDRESS1_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="profile-require_address2" type="list"
description="PLG_USER_PROFILE_FIELD_ADDRESS2_DESC"
label="PLG_USER_PROFILE_FIELD_ADDRESS2_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="profile-require_city" type="list"
description="PLG_USER_PROFILE_FIELD_CITY_DESC"
label="PLG_USER_PROFILE_FIELD_CITY_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="profile-require_region" type="list"
description="PLG_USER_PROFILE_FIELD_REGION_DESC"
label="PLG_USER_PROFILE_FIELD_REGION_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="profile-require_country" type="list"
description="PLG_USER_PROFILE_FIELD_COUNTRY_DESC"
label="PLG_USER_PROFILE_FIELD_COUNTRY_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="profile-require_postal_code" type="list"
description="PLG_USER_PROFILE_FIELD_POSTAL_CODE_DESC"
label="PLG_USER_PROFILE_FIELD_POSTAL_CODE_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="profile-require_phone" type="list"
description="PLG_USER_PROFILE_FIELD_PHONE_DESC"
label="PLG_USER_PROFILE_FIELD_PHONE_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="profile-require_website" type="list"
description="PLG_USER_PROFILE_FIELD_WEB_SITE_DESC"
label="PLG_USER_PROFILE_FIELD_WEB_SITE_LABEL"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="profile-require_favoritebook"
type="list"
label="PLG_USER_PROFILE_FIELD_FAVORITE_BOOK_LABEL"
description="PLG_USER_PROFILE_FIELD_FAVORITE_BOOK_DESC">
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field name="profile-require_businesstype"
type="list"
label="PLG_USER_PROFILE_FIELD_BUSINESS_TYPE_LABEL"
description="PLG_USER_PROFILE_FIELD_BUSINESS_TYPE_DESC">
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field
name="profile-require_aboutme"
type="list"
label="PLG_USER_PROFILE_FIELD_ABOUT_ME_LABEL"
description="PLG_USER_PROFILE_FIELD_ABOUT_ME_DESC">
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
<field
name="profile-require_dob"
type="list"
label="PLG_USER_PROFILE_FIELD_DOB_LABEL"
description="PLG_USER_PROFILE_FIELD_DOB_DESC"
>
<option value="2">JOPTION_REQUIRED</option>
<option value="1">JOPTION_OPTIONAL</option>
<option value="0">JDISABLED</option>
</field>
</fieldset>
</fields>
</config>
</extension>
===========================================================
/plugins/user/profile/profiles/profile.xml:-
===========================================================
<?xml version="1.0" encoding="utf-8"?>
<form>
<fields name="profile">
<fieldset name="profile"
label="PLG_USER_PROFILE_SLIDER_LABEL"
>
<field
name="address1"
type="text"
id="address1"
description="PLG_USER_PROFILE_FIELD_ADDRESS1_DESC"
filter="string"
label="PLG_USER_PROFILE_FIELD_ADDRESS1_LABEL"
message="PLG_USER_PROFILE_FIELD_ADDRESS1_MESSAGE"
size="30"
/>
<field
name="address2"
type="text"
id="address2"
description="PLG_USER_PROFILE_FIELD_ADDRESS2_DESC"
filter="string"
label="PLG_USER_PROFILE_FIELD_ADDRESS2_LABEL"
message="PLG_USER_PROFILE_FIELD_ADDRESS1_MESSAGE"
size="30"
/>
<field
name="city"
type="text"
id="city"
description="PLG_USER_PROFILE_FIELD_CITY_DESC"
filter="string"
label="PLG_USER_PROFILE_FIELD_CITY_LABEL"
message="PLG_USER_PROFILE_FIELD_CITY_MESSAGE"
size="30"
/>
<field
name="region"
type="text"
id="region"
description="PLG_USER_PROFILE_FIELD_REGION_DESC"
filter="string"
label="PLG_USER_PROFILE_FIELD_REGION_LABEL"
message="PLG_USER_PROFILE_FIELD_REGION_MESSAGE"
size="30"
/>
<field
name="country"
type="text"
id="country"
description="PLG_USER_PROFILE_FIELD_COUNTRY_DESC"
filter="string"
label="PLG_USER_PROFILE_FIELD_COUNTRY_LABEL"
message="PLG_USER_PROFILE_FIELD_COUNTRY_MESSAGE"
size="30"
/>
<field
name="postal_code"
type="text"
id="postal_code"
description="PLG_USER_PROFILE_FIELD_POSTAL_CODE_DESC"
filter="string"
label="PLG_USER_PROFILE_FIELD_POSTAL_CODE_LABEL"
message="PLG_USER_PROFILE_FIELD_POSTAL_CODE_MESSAGE"
size="30"
/>
<field
name="phone"
type="tel"
id="phone"
description="PLG_USER_PROFILE_FIELD_PHONE_DESC"
filter="string"
label="PLG_USER_PROFILE_FIELD_PHONE_LABEL"
message="PLG_USER_PROFILE_FIELD_PHONE_MESSAGE"
size="30"
/>
<field
name="website"
type="url"
id="website"
description="PLG_USER_PROFILE_FIELD_WEB_SITE_DESC"
filter="string"
label="PLG_USER_PROFILE_FIELD_WEB_SITE_LABEL"
message="PLG_USER_PROFILE_FIELD_WEB_SITE_MESSAGE"
size="30"
/>
<field
name="favoritebook"
type="text"
description="PLG_USER_PROFILE_FIELD_FAVORITE_BOOK_DESC"
filter="string"
label="PLG_USER_PROFILE_FIELD_FAVORITE_BOOK_LABEL"
message="PLG_USER_PROFILE_FIELD_FAVORITE_BOOK_MESSAGE"
size="30"
/>
<field
name="businesstype"
type="list"
description="PLG_USER_PROFILE_FIELD_BUSINESS_TYPE_DESC"
label="PLG_USER_PROFILE_FIELD_BUSINESS_TYPE_LABEL"
filter="string">
<option value="Distributor">Distributor</option>
<option value="Decorator">Decorator</option>
<option value="Retailer">Retailer</option>
<option value="None of the Above">None of the Above</option>
</field>
<field
name="aboutme"
type="textarea"
description="PLG_USER_PROFILE_FIELD_ABOUT_ME_DESC"
label="PLG_USER_PROFILE_FIELD_ABOUT_ME_LABEL"
message="PLG_USER_PROFILE_FIELD_ABOUT_ME_MESSAGE"
cols="30"
rows="5"
filter="safehtml"
/>
<field
name="dob"
type="calendar"
label="PLG_USER_PROFILE_FIELD_DOB_LABEL"
description="PLG_USER_PROFILE_FIELD_DOB_DESC"
/>
<field
name="tos"
type="tos"
default=""
label="PLG_USER_PROFILE_FIELD_TOS_LABEL"
description="PLG_USER_PROFILE_FIELD_TOS_DESC">
<option value="1">PLG_USER_PROFILE_OPTION_AGREE</option>
<option value="">JNO</option>
</field>
</fieldset>
</fields>
</form>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment