Re-arranging in multifield | Community
Skip to main content
arpan-garg
Community Advisor
Community Advisor
July 17, 2017
Solved

Re-arranging in multifield

  • July 17, 2017
  • 1 reply
  • 1104 views

I have a requirement where on click of add item in multifield a set of text boxes and dropdown will be populated. On change of these dropdown values , textboxes would be hidden and showed as per requirement. I have achieved this requirement but on rearranging the multifield items using the arrow keys the functionality break. Is there any listener that works on clicking on up down arrow in multifield?smacdonald2008Amy_WongDebbieWoojin

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Eakambaram

You can inspect and see the class for up and down arrows (In both classic and touch UI). You can write click event on both up and down arrows which will re arrange the items and have your custom logic in side that captured click event.

Below is sample code for classic UI.

$('.cq-multifield-up').on('click', function(evt) {
  //custom logic will go here.

});

$('.cq-multifield-down').on('click', function(evt) {
  //custom logic will go here.

});

1 reply

EakambaramAccepted solution
Level 3
July 17, 2017

You can inspect and see the class for up and down arrows (In both classic and touch UI). You can write click event on both up and down arrows which will re arrange the items and have your custom logic in side that captured click event.

Below is sample code for classic UI.

$('.cq-multifield-up').on('click', function(evt) {
  //custom logic will go here.

});

$('.cq-multifield-down').on('click', function(evt) {
  //custom logic will go here.

});