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

SOLVED

Disable add button in touch ui multifield

Avatar

Community Advisor

hi team,

May i know how to disable add button on coral 3 multi field in touch UI when it reaches the maximum limit?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi,

You need to write code to achieve that e.g.

AEM - Touch UI Component Dialog Field Regex/Custom Validation

You can write this code on event of Add button

$inputEle = $("your multifield item")

var multiFieldItem = $inputEle.find("coral-multifield-item").size();

var multiFieldbutton = $inputEle.find(".coral-Button")

                if (multiFieldItem > max) {

                // disabled add button using javascript

multiFieldbutton.attr("disabled", "disabled");

                }

View solution in original post

2 Replies

Avatar

Correct answer by
Community Advisor

Hi,

You need to write code to achieve that e.g.

AEM - Touch UI Component Dialog Field Regex/Custom Validation

You can write this code on event of Add button

$inputEle = $("your multifield item")

var multiFieldItem = $inputEle.find("coral-multifield-item").size();

var multiFieldbutton = $inputEle.find(".coral-Button")

                if (multiFieldItem > max) {

                // disabled add button using javascript

multiFieldbutton.attr("disabled", "disabled");

                }