How to display a confirmation Pop up in Service Portal

Arun87
Giga Contributor

Hi Team,

  We have a catalog item and user will be filling the details in the catalog item form in service portal. While user is submitting the request it should display the message stating "Are you sure to submit the request: requested for" and it should contain ok and cancel button. If user is selecting ok it should submit the request. If user is selecting cancel then it should be in the same page. Kindly help me to achieve this,

 

19 REPLIES 19

Do you have a variable on your catalog item to store the Requested for user?

If this answer is helpful please mark correct and helpful!

Regards,
Chris Perry

Hi Chris,

  We have a variable in catalog item to store the requested for user in the form.

What is the name of that variable? Is it different than 'requested_for'?

If this answer is helpful please mark correct and helpful!

Regards,
Chris Perry

Hi Chris,

  Variable name is requested_for only. Please help me on this.

Ok, can you please post a screenshot of the popup behavior from below line of code?

var popup = confirm('Are you sure to submit the request ' + g_form.getDisplayBox('requested_for') + '?');

If this answer is helpful please mark correct and helpful!

Regards,

Christopher Perry

If this answer is helpful please mark correct and helpful!

Regards,
Chris Perry