The Issue here is I tried deleting an item and on clicking the "Submit" button of dialog box the new child nodes are not getting updated/saved under the formFields node. And when i re-opened the dialog box i am seeing the total 3 items instead of two.
Provide references/Inputs like : on clicking the "Submit" button of dialog box I need to delete the child nodes present under the formFields node using Java Script/jQuery.
Couple of things i can suggest before you look for custom listeners or customization, as it should work OOTB
(I believe your issue is consistant whether you create new node or try to modify/delete existing and its not working, because it shouldn't be different until there is structure change in dialog configuration after creating some initial nodes)
1. Check the network header while submitting the dialog and find out how the form data for dialogs are submitting (this will give you understanding in debugging what happens during node creation vs modify/delete)
2. use composite = true on multifield node
3. i saw you are using nested multifield (custom multified inside OOTB multifield)
- first remove this and test if it work after executing first step
- then configure props acs-commons-nested = NODE_STORE as fieldset for child multified
Now, if above doesn't work then listener (jQuery) you can write at mulfield node by adding clientlib node and defining category which will execute
You need to use the default sling servlet to delete the nodes on save click using ajax and once call is done you can save. But is it a one-time activity or you need to do it always does not matter how many nodes are there?