You are viewing limited content. For full access, please sign in.

Question

Question

Customize 'Save Draft' field click event using Javascript

asked on December 4, 2016 Show version history

Hi ,

Is it possible to get the click event of 'Save Draft' button using JavaScript function,My requirement is to save some field information in database externally.

Any suggestions guys?

0 0

Replies

replied on December 5, 2016

Yes you would add in the following event listener to your js section, then add in your desired code.

$(".draft-btn").click(function(e) { 
 //run desired code
});

 

0 0
replied on December 5, 2016

Hi Xavier,

the code which you provide is for the draft button handling click event on the initial stage,but i am referring the draft button on the top right of the page after submission when the task is opened.I need to customize that button ,hope you got that.

Here i attached the screenshot of that page too.

Untitled.png
Untitled.png (22.33 KB)
0 0
replied on December 12, 2016

I would advise following a different approach, such as running a workflow activity after the submission to update your database. You can't modify that default button without messing with the program files

0 0
replied on December 12, 2016

Thanks for your response,I need to achieve this when user clicks default 'save draft' button.I believe Workflow activity works only after submission of Form.

Is it possible to trigger Workflow activity on 'save draft' button click?

0 0
replied on December 13, 2016

No that functionality does not exist. You could edit the form the user task receives to have a field allowing the user to save the form and have that kick off a workflow

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.