Hello community, using multifields on our dialogs is very useful, but sometimes when you have one with many items, its hard to add an item and up it to the top of the list on the multifield, because the normal behaviour of the button is insert a new item at the end. Is possible have two buttons add, one for adding at top and the other for adding on bottom? Someone used this before? I did a research about on the multifield widget but I couldn't find a solution for this.
I would be grateful for any help with this.
Regards.
K.
Solved! Go to Solution.
Topics help categorize Community content and increase your ability to discover relevant content.
Hey K,
It is possible to add any wonderful modifications you wish to do by overlaying[1] existing AEM components.
In your case, you possibly want to overlay /libs/granite/ui/components/foundation/form/multifield/render.jsp as well as add a bit of extra javascript logic for the new button to pre-pend elements to mutli-field instead of existing append.
[1] https://docs.adobe.com/docs/en/aem/6-0/develop/platform/overlays.html
Hope it helps!
Regards,
Peter
Hey K,
It is possible to add any wonderful modifications you wish to do by overlaying[1] existing AEM components.
In your case, you possibly want to overlay /libs/granite/ui/components/foundation/form/multifield/render.jsp as well as add a bit of extra javascript logic for the new button to pre-pend elements to mutli-field instead of existing append.
[1] https://docs.adobe.com/docs/en/aem/6-0/develop/platform/overlays.html
Hope it helps!
Regards,
Peter
Hi Peter,
I'll going to test this asap, and make the needed modifications for my own multifield behaviour.
Thanks you very much.
Views
Replies
Total Likes
Hi,
did you had a chance to implement this? if so could you kindly share me info as to how to do it. i have a similar requirement to be done.
in multifield
1. whenever i click "add item" new item should be added at top and not at bottom.
2. also place "add item" button at top and not at bottom of the items.
Thanks
Views
Replies
Total Likes