How to disable "Order now" button in Service Portal after submitting a catalog item?

Joaquin Campos
Mega Sage

Dear community,

I'm having real challenges with "Order now" action (in our case we have configured "Request" method so for us it's "Request now") in our Service Catalog because when clicking on it for catalog items, button is not disabled while processing logic behind until redirected to next page. As result, if end user is not patient enough, they click on the button several times creating multiple request.

For any reason this is not happening with order guides, where button is automatically disabled after submission:

find_real_file.png

How can I get the same behavior of order guides in catalog items?

As a workaround I've even added a warning message after submit asking the end user to click only once, but it's not avoiding all duplicates.

Thank you in advance for your help!

 

Joaquín

1 ACCEPTED SOLUTION

Hi Pratiksha,

 

Definitely you gave me a hint to find the solution of my issue. I've noticed that we had a custom version of SC Catalog Item widget and I've just moved back to the standard widget and it works as expected.

Thanks a lot for your help!

 

Joaquín

View solution in original post

4 REPLIES 4

Hi Pratiksha,

Thanks for your help but I'm not looking for hidding buttons. What I need is to disable the button once it has been clicked to make sure it's only clicked once.

Regards:

 

Joaquín

Hello,

okay..

you can do like this in the widget

HTML:

<div>
<button type="submit" ng-disabled="isDisabled" ng-click="disableButton()"> Click me to disable myself</button>
<!--button ng-disabled="true" type="button" onclick="alert('Hello world!')">Click Me!</button-->
</div>

 

client script

function($scope) {
/* widget controller */
var c = this;
$scope.isDisabled = false;

$scope.disableButton = function() {
alert("I am disabled");
$scope.isDisabled = true;
}


}

If answer is helpful mark correct!

Thanks

Pratiksha

Hi Pratiksha,

 

Definitely you gave me a hint to find the solution of my issue. I've noticed that we had a custom version of SC Catalog Item widget and I've just moved back to the standard widget and it works as expected.

Thanks a lot for your help!

 

Joaquín