Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Submit adaptive form in workspace from within the form

Avatar

Level 1

Hi,

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!

2 Replies

Avatar

Level 1

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[0];

submitButton.click();

Avatar

Level 7

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