Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn more

View all

Sign in to view all badges

SOLVED

How to detect Approve/Reject Button pressed in the form

hkho
Level 3
Level 3

Hi, I've created a process and after kick off the process, assigned user can approve/reject the form in workspace. Can I detect which button is pressed in the form and perform different validation before the form is submitted back to server?

For example, the form got field A & field B, if Approve button is pressed, field A will be a manadated field and if Reject button is pressed, field B will be a manadated field. As in my form I only got a submit button and the Approve/Reject button is generated from workspace, so I am not sure how to detect which button is pressed in the form? Thanks.

1 Accepted Solution
Jasmin_Charbonn
Correct answer by
Level 10
Level 10

There's no need to put the Approve/Reject buttons on the form. You just need the process fields.

The following post might be useful: http://forums.adobe.com/message/1356826#1356826.

Jasmin

View solution in original post

5 Replies
__VIKS__
Level 3
Level 3

Hi  hkho,

     I think you may have to change your form design a bit.

     I would suggest add the Approve and Reject buttons to your form rather than route names, so that way you have control over actions.

     You can do required validation on the form on button click event and if validation are successful then submit the form as part of javascript using  AWS_SUBMIT.execEvent("click");

Regards,

Vik

hkho
Level 3
Level 3

Thanks for the reply, so the buttons have to be on the form and I can't put it in the workspace like the Complete button?

Jasmin_Charbonn
Correct answer by
Level 10
Level 10

There's no need to put the Approve/Reject buttons on the form. You just need the process fields.

The following post might be useful: http://forums.adobe.com/message/1356826#1356826.

Jasmin

View solution in original post

hkho
Level 3
Level 3

but if that's the case the Approve/Reject will be drop down list instead of button.

Jasmin_Charbonn
Level 10
Level 10

No, The drop down will be hidden and you'll get the buttons in the Workspace chrome.

Jasmin