We have just migrated a load of ex Livecycle forms to AEM. The bulk of these work perfectly using a slightly modified profile servlet.
The problem we are having is the on some forms where there is a Repeat section managed by the instanceManager when you add a new instance you do not see the new section on the screen. I have checked the javascript after it performs the addInstance() method and the count does increase. Also the Add button disappears when the instance count gets to the max repeats.
This is not on every form and I am trying to work out if it is a specific field type or if there is a script that is running that is preventing the html elements to be rendered.
Enabling debug on the form shows nothing exceptional.
Does anyone know where in the javascript the elements are added to the dom so I can try to workout why it is not rendering? Or has anyone experienced anything similar?
Solved! Go to Solution.
Views
Replies
Total Likes
After more debugging I think I have found the issue. For the repeat sections some of the forms had the Allow Page Breaks within Content checkbox set which was causing an issue in the profile.js code where it did not handle the syncing of the model to the HTML because the subform had been split into multiple occurrences.
To correct this I have unchecked the value in the the repeat section and the repeat container.
Given we have over 250 forms with repeat I am going to write and xslt to add the keep contentArea element for these subforms.
there is nothing specific that needs to be done. Can you please send us the form?
@IainClucas Could you share the AEM version, and whether you are using Adaptive Forms or HTML5 form. Also, a sample XDP file with which the issue is reproducible would be useful to investigate further.
We are using AEM 6.5 SP17
We upload these as XDP files and render the HTML through a servlet through the get method and the post method used the OutputService to generatePDFOutput to merge the submitted data to produce the PDF we return to the client. So its HTML5 mobile forms, not adaptive forms.
We use common fragments for the repeatHeader and repeatFooter which contains buttons and scripting to Delete and Add instances respectively.
Some forms render correctly but others when you click the Add button the instance is created and you can see it in the instanceManager, but the html is not added to the DOM. I have stepped through all the exexInitialize calls to see if it is throwing an error the means it falls out before rendering the new instance, but I cannot find anything. I was hoping next to put a break on where the html rendering is done, but I can't work out where that is.
These forms are live, but they are owned by our client. I would have to seek their permission to say where they are. I will get back to you on that.
Could you share a sample XDP file with which you are facing the issue.
I have just put in a request to our client to see if they are happy to share either the live form location and/or the xdp file(s).
Thanks
After more debugging I think I have found the issue. For the repeat sections some of the forms had the Allow Page Breaks within Content checkbox set which was causing an issue in the profile.js code where it did not handle the syncing of the model to the HTML because the subform had been split into multiple occurrences.
To correct this I have unchecked the value in the the repeat section and the repeat container.
Given we have over 250 forms with repeat I am going to write and xslt to add the keep contentArea element for these subforms.