I do have a AEM Forms 6.1 (ex LiveCycle) Workflow in the Process Management module.
Basically it's a approval workflow with several approval task (as AssignTask operation) based on a XDP form.
Now I need a solution to check which user action (e.g. Approve, Deny) the user has selected in the HTML workspace. So let's say when the user clicks the "Deny" button I want him to get forced to fill in a comment field in the form.
Put a script on the button to validate that the required fields are filled. You may need two buttons, one that the user sees and clicks on and once the validations are done it executes the click of the submit buttons.