Double Prompt Confirm Message during Form Submit (FAFR)

Double Prompt Confirm Message during Form Submit (FAFR)

Dear All,

On form submit (FAFR) we've wrote the below Script to prompt the message for the Requester before submitting the request but using the below script it double prompt the message (twice). Please kindly guide me to allow or provide the updated script which will prompt confirm message only once before form submitting.

Script:
var x = $CS.getValue("REQUESTER");
if (confirm('Dear ' + x + ',' + '\n \nAre you sure you want to submit this request?' + '\n \nPlease note, once this request has been submitted, it cannot be reverted back')) {
} else {
  // Do nothing!
  $CS.stopFormSubmission();
}

Regards,
Wajahath Farooq

                  New to ADSelfService Plus?