Submit adaptive form in workspace from within the form

Avatar

Avatar
Give Back
Level 1
martinos10
Level 1

Like

1 like

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 1
View profile

Avatar
Give Back
Level 1
martinos10
Level 1

Like

1 like

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 1
View profile
martinos10
Level 1

16-02-2018

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!

Replies

Avatar

Avatar
Give Back
Level 1
martinos10
Level 1

Like

1 like

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 1
View profile

Avatar
Give Back
Level 1
martinos10
Level 1

Like

1 like

Total Posts

2 posts

Correct reply

0 solutions
Top badges earned
Give Back
Ignite 1
Boost 1
View profile
martinos10
Level 1

19-02-2018

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

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

68 likes

Total Posts

205 posts

Correct reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile

Avatar
Validate 10
Level 5
DarrenBiz
Level 5

Likes

68 likes

Total Posts

205 posts

Correct reply

37 solutions
Top badges earned
Validate 10
Validate 1
Ignite 5
Ignite 3
Ignite 1
View profile
DarrenBiz
Level 5

21-02-2018

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