Add Confirmation Option to Form Submission
search cancel

Add Confirmation Option to Form Submission

book

Article ID: 273644

calendar_today

Updated On:

Products

CA Service Catalog

Issue/Introduction

Customer currently has a configuration using alert() which will generate a popup message when a user submits a request

They want this pop up to have a Yes and No button

Clicking the Yes button will submit the request

Clicking the No button will bring the user back to the form

Environment

Release : 17.3

Resolution

This can be done, but be warned that this is a customization which is out of the scope of support

Support will not be able to provide further support for this customization

In the onSubmit section of your form, configure the following:

{jstest:function()
{
  response=confirm('Craig test');
  if(response) {
    alert("OK")
    return true;
  } else {
    alert("Cancel")
    return false;
  }
}
}

 

An alternative would be to use the confirm() function

Additional Information

This is a CUSTOMIZATION and is out of scope of support

Support will not be able to provide further support on this configuration