Enabling "submit" button on sc_catalog_item widget

Shillu
Kilo Guru

I am working on a requirement for service catalog on service portal. The sc_catalog_item widget is cloned and customized. The customization applied to that widget is for "disabling" the OrderNow/submit button under certain conditions.

The sc_cat_item page also has an embedded macro widget. This macro widget has a checkbox in it. When the form renders and the conditions are met for "disabling" of the "submit" button, the user should be able to click the check box inside the embedded macro widget and the "submit" button will be "enabled". I need help with this part.I am looking into the inter-widget communication concept to achieve this. Is that the right direction? Any suggestions or ideas will be appreciated.

Thank you!

 

8 REPLIES 8

Shillu
Kilo Guru

find_real_file.png

both should work , prefer using emit.

 

Add the below code inside your parent widget  client contrller:

 

function ($scope) {
   $scope.$on(‘start.wait.list’,
       function(event, data) {
           c.disaleOrderNowButton = false;
       });
}


this will enable your submit button on click of your check box

Shillu
Kilo Guru

Thank you, Satheesh! That did not produce the expected result...

I have resolved this issue.

1. Removed the one time binding in the HTML template for the submit button

broadcasting widget

HTML

find_real_file.png

Client Script

 

find_real_file.png

Listening widget

HTML

find_real_file.png

 

Client Script

find_real_file.png

find_real_file.png

This works well now. Thank you!