arunpatidar02 / aem63app-repo

Repository for AEM63App
37 stars 43 forks source link

AEM 6.5.5 Multifeild with dropdown creating extra items at the node #5

Closed NagalaxmiT closed 3 years ago

NagalaxmiT commented 3 years ago

Hi Arun,

I am using a multifiled with dropdown selection to populate feilds based on the selection, I have added the js which is suggested here, now the dialog is retaining the values but at the node level its adding an extra empty node. When I try to add another item to the existing list its adding the entire set double time. I have attached the complete component below in the AEM package but when I try to author the component its adding an empty item for each filed. Pls see the below attachment. image

arunpatidar02 commented 3 years ago

@NagalaxmiT The javascript used to show hide multifield does not do any modification. Could you please try to disable this javascript and check the dialog value again? I am sure there is another javascript that is causing the issue.

NagalaxmiT commented 3 years ago

@arunpatidar02 After I disable the java script the dropdown options are not populating at the dialogue though I have selected the option. instead of using cq-dialog-dropdown-showhide-multi, when I use the cq-dialog-dropdown-showhide the values are storing successfully at the node level with out empty, but when I try to re-open the dialog the authored values are disappearing. I am new to listerns unable to identify where it is going wrong.

arunpatidar02 commented 3 years ago

@NagalaxmiT could you please share your dialog xml?

NagalaxmiT commented 3 years ago

@arunpatidar02 , pls find the attached xml in zip format .content.xml.zip

arunpatidar02 commented 3 years ago

@NagalaxmiT The issue is with your dialog, you have 2 filed with same name e.g. ./vidpathin dmvideo and ytvideo node. Multifield try to get all the values and from name field and save it doesn't matter if values are hidden or shown. You need to disabled the item values, just write a custom script to disable all field for hidden elements, this will fix your issue.

The issue is not due to showhide but due to dialog structure. Closing the bug now.