Add Custom User Profile Fields in Joomla – Step 3/3 Updated on August 16, 2021 by Brad Markle 2 Minutes, 2 Seconds to Read Joomla 2.5 has reached its end of life as for 12/31/2014. Please be advised this may be a security risk to your website. You can view more information about the end of life here. In our last few tutorials, we have been showing you the steps in how to add custom fields to the Joomla 2.5 user profile plugin. At this point we have copied the user profile plugin and updated the user facing form that asks them to enter in the new field. Our next step is to update the plugin’s parameters and allow the site Administrator to control whether the field is optional, required, or disabled. Again, in this tutorial series we have been updating the Joomla 2.5 user profile plugin and adding a custom user profile field that allows the user to enter their favorite baseball team. We need to allow the site administrator to determine whether the user needs to add something for this field for not. The first file we need to edit is: plugins/user/profile10/profile10.php We are making an update around line 171, and adding the following line (highlighted in red): $fields = array( 'address1', 'address2', 'city', 'region', 'country', 'postal_code', 'phone', 'website', 'baseballteam', 'favoritebook', 'aboutme', 'tos', 'dob', ); The next file we will need to edit is: plugins/user/profile10/profile10.xml There are two entires we need to make: User profile fields for registration and administrator user forms User profile fields for profile edit form The first item controls the form users fill out when registering. We added the following at line 109: <field name="register-require_baseballteam" type="list" description="During registration, if you have a favorite baseball team, enter it here." label="Favorite BaseBall Team" > <option value="2">JOPTION_REQUIRED</option> <option value="1">JOPTION_OPTIONAL</option> <option value="0">JDISABLED</option> </field> The next item is added at line 248, and controls whether the user can edit the field’s value after they’ve initially registered and then try to edit their profile: <field name="profile-require_baseballteam" type="list" description="If you have a favorite baseball team, enter it here." label="Favorite BaseBall Team" > <option value="2">JOPTION_REQUIRED</option> <option value="1">JOPTION_OPTIONAL</option> <option value="0">JDISABLED</option> </field> The two options above can be seen when the Joomla 2.5 site administrator is editing the user profile plugin’s settings: Share this Article Related Articles Prevent New Account activation email sent to Joomla 2.5 Administrator Joomla 3.1 Error – Could not instantiate mail function How to Create a Slideshow (Carousel) in Joomla 4.0 using Bootstrap How to write a blog post in Joomla 3.1 How to Use the Free Mini Frontpage Extension for Joomla 4.0 How to Change a Joomla 2.5 User’s Email Address How to Configure Joomla 2.5 to Send Email Using SMTP How to Edit a Joomla 3 Template How to install Phoca Gallery for Joomla 2.5 Creating a Menu Item for your Joomla 3 Component