I am trying to submit an adaptive form within forms workspace programmatically back to the forms workflow. The submit button on the forms workspace container works correctly but I have requirements for custom validations and business rules within the adaptive form so I need to use multiple buttons and be able to submit programmatically. This is for an upgrade from livecycle so i cannot replace forms workflows with AEM workflows. I am basically looking for guideBridge.submit() but for a forms workspace submit. How would I do this?
Any help would be appreciated! Thanks!
I have found a way to do this but it doesn't seem like it would be the best practice method:
var elements = window.parent.document.getElementsByClassName("submitOption left-btn");
var submitButton = elements;
We had this requirement a while ago to perform AF validations via a workspace button. The messaging from the AEM Forms team is that there is no bridge and it was not possible programmatically from the adaptive form.
What you have done is viable, provided the Workspace code doesnt change. We made a conscious decision to not change the underlying Workspace code as it creates a nightmare should you want to upgrade your version of AEM or workspace