How to know "Save as Draft" and "Submit" event in custom store binder

Confluence User - 06 Mar, 2017

Hi,

 

I want to know if there is any way I can find different events of "Save as Draft" and "Submit" in custom store binder.

 

I have a custom store binder which should only fire when user clicks on submit button, if user press  "Save as Draft" it should only saves data

Right now when user clicks on  "Save as Draft" whole functionality written in custom store binder triggered because it is attached with that form.

 

Any suggestion/ comments/ help would be highly appreciated.   

 

With Best Regards,

TK

forms;workflow

3


06 Mar, 2017
confluenceUser
1
confluenceUser

Hi there,

Apparently, 'Save as Draft' does 'Submit' the form but instead of marking that activity as completed, it holds the process execution sequence at that point. Therefore, all your store binders would behave as they would when the form is being submitted.

A quick hack could be to add a hidden field in your form to capture the event of 'Saving as draft' and 'Submit' via JavaScript and using it's value to switch between your implementations on the store binder. For this, you'd need to call the event.preventDefault() for both the buttons, set the value of your hidden field and then resume the event operation. I hope this would work.

Thanks! 

21 Mar, 2017
confluenceUser
confluenceUser

Hi

Good news! After months of intensive development, we're proud to announce the beta for Joget Workflow Version 6 is now available for download at http://www.joget.org/joget-workflow-v6/#next

Read what's new in Joget workflow Version 6 at http://www.joget.org/joget-workflow-v6/

26 Mar, 2024
confluenceUser
confluenceUser
RELATED QUESTIONS

Your answer


To answer a question you'll need an account.

Print