Confirmation Message - Save & Submit button

  • 23 November 2017
  • 6 replies
  • 510 views

Badge +4

hi All,

 

may i know when i click on 'cancel' in the confirmation message trigger by "Save & Submit" button but then the form still submit.

it should work this way right ?

- when click 'OK' , proceed to submit the form

- when click 'Cancel', return to the form

 

thanks


6 replies

Userlevel 4
Badge +12

Agreed. The behaviour is not exclusive to save and submit button though. Also cancel buttons and regular save buttons perform their respective actions even the user hits "Cancel" in the confirmation dialog.

Users would expect that nothing happens if they hit cancel.

I'm not sure if this is a bug or somehow intended by Nintex so I'd suggest to open a support ticket at Nintex.

I have faced this Issue, below is the workaround.
Default Submit button-set to hidden with CSS class as following 
 
then created button of type- JavaScript and on client click added code to create -custom confirmation dialog
 
  var status= confirm("Do you wish to submit task?");
       if(!status)    {  return false;}
       else  { // call form Submit button
      NWF$(".customclass").click(); }

If Confirmation dialog returns
1. True then call Submit button click event- NWF$(".myclass").click()
2. False- just returning to current form.

Badge

What is the JavaScript to use when a customer clicks the save and submit to generate a unique request ID#? This is the formula that was used for InfoPath,  concat("Service name File Name", "-", userName(), number(substring(now(), 6, 2)), number(substring(now(), 9, 2)), number(substring(now(), 1, 4)), number(substring(now(), 12, 2)), number(substring(now(), 15, 2)), number(substring(now(), 18, 2))). It generates this unique ID:  SPS-vhaorlperkic113201782122. So to break this down to make sense: SPS-vhaorlperkic113201782122

strFilename = “Name” in your item below, this is typically the default “Title” column when you create a new list/library

Everything in yellow highlight, is the actual code to create this within InfoPath.

Concat creates the string

“Service name/file name” = SPS

“-“ adds a dash between the Service name/file name: SPS-

“username” = the person that created the entry/request, this is pulled from SP so it is auto generated and cannot be faked: SPS-vhaorlperkic number(substring(now(), 6, 2)), number(substring(now(), 9, 2)), number(substring(now(), 1, 4)), number(substring(now(), 12, 2)), number(substring(now(), 15, 2)), number(substring(now(), 18, 2)) = how we have to code the SP generated current month, day, year, hour, minute, second: SPS-vhaorlperkic113201782122

Badge +11

Same issue here!

There is a SAVE and SAVE AND SUBMIT action.
When adding the confirmation message e.g. Are you sure you want to submit?

Then a  SUBMIT and CANCLE button appear.
Whichever option you click, the action is still run.

This is a bit 😕 hmmmmmm 

Hi @nitak 


May I know if we can customize the Yes and No to other wordings? appreciate your help.Thank you.

Nitak's solution is great! it works.  Thank you so much. 

Reply