Help with AEM multi field | Community
Skip to main content
WaysToGo
New Participant
Jun 20, 2018 9:41 AM UTC
Solved

Help with AEM multi field

Hi,

i am new to AEM

my question is how to change the button text which is present inside Multi-field  by default it is "Add" in  AEM(6.4) and "AddField"(AEM(6.3))

Thanks 

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Techaspect_Solu
Techaspect_SoluAccepted solution
Level 7
Jun 20, 2018 1:47 PM UTC

Hi,

You can create a custom client library and to have your client library loaded solely for your component dialog, you need to set the property extraClientLibs of your dialog to the category name of the client library you have just created. For more information on how to set extraClientLibs, you can refer to the below link:

AEM Components for the Touch-Optimized UI

Below is the sample js code to change the button text which is present inside Multi-field:

$(function() {

    $(document).on("dialog-ready", function(){

        $('.coral-Multifield .coral-Button--secondary').find('coral-button-label').html('give any text');

});

});

Hope this helps!

Regards,

TechAspect Solutions

4 replies

smacdonald2008
Level 10
Jun 20, 2018 2:43 PM UTC

For general AEM mutli-field info - see these docs:

1 - Scott's Digital Community: Creating a HTL Repeating Data Set 6.3 Component that uses Sling Models

2 - Building Experience Manager Components using Granite/Coral Resource Types

These both show use of granite/ui/components/coral/foundation/form/multifield

Translate
smacdonald2008
Level 10
Jun 20, 2018 2:15 PM UTC

Great replies.

Translate
Techaspect_Solu
Techaspect_SoluAccepted solution
Level 7
Jun 20, 2018 1:47 PM UTC

Hi,

You can create a custom client library and to have your client library loaded solely for your component dialog, you need to set the property extraClientLibs of your dialog to the category name of the client library you have just created. For more information on how to set extraClientLibs, you can refer to the below link:

AEM Components for the Touch-Optimized UI

Below is the sample js code to change the button text which is present inside Multi-field:

$(function() {

    $(document).on("dialog-ready", function(){

        $('.coral-Multifield .coral-Button--secondary').find('coral-button-label').html('give any text');

});

});

Hope this helps!

Regards,

TechAspect Solutions

Translate
arunpatidar
New Participant
Jun 20, 2018 11:04 AM UTC

Hi,

You may need to overlay /libs/granite/ui/components/coral/foundation/form/multifield/render.jsp for coral3 Multifield for both AEM6.3 and AEM6.4

Beware this would be a global change, Multifield button text will be change at all the places including dialog.

Thanks

Arun

Translate
Arun Patidar