Expand my Community achievements bar.

SOLVED

How to detect Approve/Reject Button pressed in the form

Avatar

Former Community Member

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

Avatar

Correct answer by
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

Avatar

Former Community Member

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

Avatar

Former Community Member

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?

Avatar

Correct answer by
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

Avatar

Former Community Member

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

Avatar

Level 10

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

Jasmin