How to add user custom fields to the edit profile form? - joomla

I had to add a series of custom fields to the joomla registration form. Thanks to the guide I managed to do it, both for the registration form and for the administrator form.
The process I followed for this are the following:
Added the fields to the users table
Added the fields in joomla user entity /library/src/user/user.php
Added the fields and definition to /components/com_users/model/forms/registration.xml file to update the registration form
Added the fields and definition to administrator/components/com_users/model/forms/user.xml file to update the user edition form for user with administrator role
Now I require the user to be able to change their profile data with the inthe fields that were created manually. To do this I added a link to the menu
form to edit profile, here I expected to see all user fields, both native and custom created, but instead I obtain only the native fields, although upon inspecting the object (user) I can access all the user fields.
I created the fields by hand and then I expected that when they were saved they would persist, but it is not, when sending the form only the native data is updated and not the custom fields.
When I inspect, I see that a component named k2 is the one that facilitates this profile editing form, I am new to joomla and its ecosystem
Could you please give me guidance on how to implement this task?
Greetings and thanks in advance

Do not edit core components.
There is a way to do the same using Profile plugin.
https://docs.joomla.org/Creating_a_profile_plugin
Go through above link and create a new profile plugin.

This is not the way to add extra user fields. What will you do if you need to update Joomla. Joomla releases security updates at regular intervals. First you need to create a user plugin and then you add whatever user fields you need. I found a detailed description here, you also can have a look. if still you get any doubts you can ask me here in comments.
https://smartyblog.com/adding-custom-fields-to-joomla-registration-using-profile-plugin/

Related

Managing custom fields in appcelerator portal

When i log into the arrowdb on the appcelerator portal i can go into the "manage data" and click down to a specific user object.
I wish to edit a "custom field" in a User object.
Previously in ACS all the custom fields were available for edit, but now in arrowdb i cannot even see the custom fields only add new. If i add a new custom field for a custom field that should already exist it seems to change the value. However i want to be able to see the values too.
Am i doing something wrong? Should i edit the user object somewhere else?

Understanding the Joomla Component File Structure / from URL

I'm new to joomla and have got a problem with a website.
I need to modify a view and I've been told it is in
http://www.example.com/index.php?option=com_user&view=register&Itemid=68
It has a registration form and i need to modify its field. I've access to FTP only. I need to know where are these files to modify the registration form. If one can describe the meaning of this url structure then it would be very helpful.
You will find the template files in /components/com_user/views/register/tmpl.
However, you should create an html/com_user folder in your template directory with a copy of those files and use a template override ("never" edit core files).
Here are a couple resources that will point you in the right direction:
http://docs.joomla.org/J2.5:Developing_a_MVC_Component/Introduction
http://docs.joomla.org/How_to_override_the_component_mvc_from_the_Joomla!_core
com_user means use the user component register view.
Itemid 68 refers to the id of the menu item it is linked from.
You don't want to directly modify any joomla files.
If you want to add a field to registration activate the user plugin or create your own user plugin along the same design but with the fields you want.
It is advisable not to modify the core files directly, they will get overridden whenever the Joomla is updated.
However what you are looking for is available at components\com_users\models\forms\registration.xml file. you can change the default fields of the registration form in this file.
If you would like to add additional fields to registration form, there is a better way:
http://docs.joomla.org/Creating_a_profile_plugin

Magento Customer Wizard Registration

I'm trying to create a simple registration for the magento visitors using custom steps. I need to create a wizard that helps the users to follow a path previously set in the administration panel.
At the moment I have created the extension but I am having some difficulties to create the front-end wizard form. What I'd like to achieve is a multi registration form where if the user go from the first form to the second one Magento has to save the data and wait if the user wants to go on the next new form and so on...
Here a mockup: http://minus.com/lF3krBVJG0WEM
How have I to create a multiform that follow this behaviour?
Regards

Want to add extra field to Hikashop user registration section

I want to add extra field to the HikaShop user registration form for the first step of the checkout process. I could not find out the page inside the HikaShop Component actually where to add my code. Please suggest me soon.
The simplest way to do it is to create custom fields via the menu Display->Views (you have more possibilities in the commercial editions).
Otherwise,if you want to directly add your code to the form, you will have to edit the file "registration" of the view "user" via the menu Display->Views.

Change Registration form in Joomla 1.5

I am developing a website where I need to create two user types. One is "member" and the other is "merchant". Both have different areas to be accessed. I am really confused on how can I achieve this.
Also I am trying to add my custom fields of First name and Password in the default Joomla registration form. As soon as I add a new TR with field first name the registration form stops working.
Can you guys help me in doing this?
If you have some troubles with default Joomla registrtion, you could use Community Builder. It is pretty easy to add fields to users profile and users registration. To separate members and merchants you could add field to the registration form called for example Account type. And then according to its value assign new user as registered(members) or author(merchant).
First, adding user types in 1.5 is not going to accomplish the access requirements you have described. You would need to install an access control component to control different user types accessing different content.
Next, Joomla 1.5 is nearing end of life, April 2012 to be exact. Version 1.7.x released last week so you should very seriously consider moving the site to the latest version. An added bonus is that Joomla 1.7.x has built in access control levels that would accomplish what you are trying to do.
Regarding different access levels best thing to do would be upgrade to Joomla 1.6/1.7 It has this functionality built in. It may be possible to achieve this in 1.5 with third party components, but I don't have any experience with this.
Regarding custom registration fields, again, if you upgrade to 1.6/1.7 it has User - Profile plugin which allows to add additional fields to your registration form.
In 1.5 you can use third party components such as ExtendedReg (commercial).
Or alternately edit core files: http://www.mysysadmintips.com/index.php/web/100

Resources