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
Solved! Go to Solution.
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.
});
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.
});