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
BedrockMission!

Learn More

View all

Sign in to view all badges

Limit number of selection in Dropdown AEM 6.5

Avatar

Avatar
Validate 1
Level 1
rajeshk7403909
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile

Avatar
Validate 1
Level 1
rajeshk7403909
Level 1

Likes

0 likes

Total Posts

7 posts

Correct Reply

0 solutions
Top badges earned
Validate 1
View profile
rajeshk7403909
Level 1

03-02-2020

Hi There,

 

 I am currently working on dropdown/Select in AEM 6.5, I want to  limit the number of selected options , the user must only select certain maximum number of options say 2 or 3  options and  the field must be disabled unless they remove the previously selected option.

 

Thanks,

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Give Back 50
MVP
Vijayalakshmi_S
MVP

Likes

436 likes

Total Posts

574 posts

Correct Reply

191 solutions
Top badges earned
Give Back 50
Give Back 5
Ignite 10
Ignite 5
Ignite 3
View profile

Avatar
Give Back 50
MVP
Vijayalakshmi_S
MVP

Likes

436 likes

Total Posts

574 posts

Correct Reply

191 solutions
Top badges earned
Give Back 50
Give Back 5
Ignite 10
Ignite 5
Ignite 3
View profile
Vijayalakshmi_S
MVP

04-02-2020

HI,

 

  • This can be done by associating "validation" property to the desired dialog field and include desired logic in JS targeting the respective "validation" property. (Need not exactly be "validation" property, it can be granite:class or granite:id. Idea is to have an identifier for the respective dialog field and write logic targeting the same.)
  • Field Limit can be configured at dialog field level via "granite:data" node. (Will be available as data attribute on the field and the values authored can be compared against the allowed limit)

Answers (0)