Hi,
I have a dialog component the has a multifield and inside of if it has a Show hide dropdown.
It works, but the problem is that when I change the option in one item of the list, it changes on the others as well.
How can I do to change just on the item that I am in??
I was reading this answer with the same problem, but it is not working when I have many selects.
Thank you in advance!!!
Solved! Go to Solution.
Hi,
The show hide functionality is handle by /libs/cq/gui/components/authoring/dialog/dropdownshowhide/clientlibs/dropdownshowhide/js/dropdownshowhide.js
If you see the code the target elements are selected based on data attribute and which is common for all the targeted elements within multifield item. Thats why on selection of one other also getting changed.
To handle this you can find the index/position of multifield item. If dropdown and targeted element both are within same multifield item then only do show hide for this set of items.
Example code:
dropdownshowhide-multifield.js
This code will only be triggered when you have select field with class or granite:class property with value cq-dialog-dropdown-showhide-multi unlike cq-dialog-dropdown-showhide
Hi,
The show hide functionality is handle by /libs/cq/gui/components/authoring/dialog/dropdownshowhide/clientlibs/dropdownshowhide/js/dropdownshowhide.js
If you see the code the target elements are selected based on data attribute and which is common for all the targeted elements within multifield item. Thats why on selection of one other also getting changed.
To handle this you can find the index/position of multifield item. If dropdown and targeted element both are within same multifield item then only do show hide for this set of items.
Example code:
dropdownshowhide-multifield.js
This code will only be triggered when you have select field with class or granite:class property with value cq-dialog-dropdown-showhide-multi unlike cq-dialog-dropdown-showhide
@arunpatidarI have created a new issue, pls look into it. https://github.com/arunpatidar02/aem63app-repo/issues/5
Hi!
Where I can find an example how to implement this dropdown?
I need a similiar solution like the owner of this post.
Thanks in advance.
Please check another blog post at https://www.linkedin.com/pulse/aem-hideshow-drop-down-select-options-more-than-one-values-vikraman
is there an example dialog that used this js. please let me know if there's any. Thanks You.!
Hi,
Please check for dialog Creating an Experience Manager Responsive Banner Component
in Above example for point 44 add one more property class or granite:class based on Coral/Granite component
44. Add the following properties to this node.
Hi,
here is the example https://aem4beginner.blogspot.com/touch-ui-hideshow-fields-inside-coral-3
Not found, this last one.
In AEM 6.4 am trying to implement this js in dropdown inside multi field but still it's not working.
Any working example can you share
Is there any working example of toggling dialog fields based on the dropdown selection in 6.4? I tried the above-mentioned approach by @arun, but it's not working.
@Arun Patidar Link shared by you above is not working. Do you have the updated link?
Example code:
Hi,
Could you please let me know -
1. Are you using coral2 or coral3/granite components.
2. Can you see any errors in browser console?
3. What is the behaviour with this script?
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies