Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

Extending User Properties with multifield xtype is not saving

Level 2
Level 2

Hi All,

I am trying to Extend User properties, I have created a client lib, like the below

CQ.Ext.ns("CustomUserProperties"); CustomUserProperties.UserAdmin = { addCustomUserProperties: function(propPanel){ var userForm = propPanel.userForm; userForm.setAutoScroll(true); var locations = { "xtype":"multifield", "fieldLabel": "Locations", "anchor":"100%", "name":"locations" }; userForm.insert(userForm.items.length + 1, locations); userForm.doLayout(); } }; (function(){ if(window.location.pathname == "/useradmin"){ var fields =; fields.push({"name": "locations"}); var UA_INTERVAL = setInterval(function(){ var userAdmin = CQ.Ext.getCmp("cq-useradmin"); if(userAdmin && userAdmin.userProperties){ clearInterval(UA_INTERVAL); CustomUserProperties.UserAdmin.addCustomUserProperties(userAdmin.userProperties); } }, 250); } })();

I can able to see multifield and can able to add locations but when I save it its not saving complete array to /home/users, just saving only one row of the locations field value.

How can I setup/configure to save multifield variables?

Is there any alternative way to use multifield xtype ? 



Thank you,


1 Reply
Community Manager
Community Manager


Look at this community article:-


//AEM - Extend UserAdmin, add new User Properties

Here two solutions are provided, first one is preferred.

Solution - 1

1) Create a cq:ClientLibraryFolder /apps/myclientlib and add property categories of type String

2) Create /apps/myclientlib/js.txt of type nt:file and add the following


3) Create /apps/myclientlib/UserProperties.js of type nt:file and add the following code

MyClientLib.UserAdmin = {
    addSecondEmail: function(propPanel){
        var userForm = propPanel.userForm;
        var emailComp = userForm.find('name', 'email');
        var secondEmailComp = {
            "fieldLabel": "Second Email",
        userForm.insert(userForm.items.indexOf(emailComp[0]) + 1, secondEmailComp);
    if(window.location.pathname == "/useradmin"){
        var fields =;
        fields.push({"name": "secondEmail"});
        var UA_INTERVAL = setInterval(function(){
            var userAdmin = CQ.Ext.getCmp("cq-useradmin");
            if(userAdmin && userAdmin.userProperties){
        }, 250);

Another reference article:-

I hope this would be helpful to you.

Thanks and Regards

Kautuk Sahni

Level 2
Level 2


Yes I took it from the web, but my question is

How can I setup/configure to save multifield variables?

Is that possible are not?



Level 7
Level 7

Yes Krishna,

You can save multifield variables. have you tried Kautuk's approach?