1
0
-1

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

    CommentAdd your comment...

    3 answers

    1.  
      2
      1
      0

      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! 

        CommentAdd your comment...
      1.  
        2
        1
        0
      2.  
        1
        0
        -1

        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/

          CommentAdd your comment...