Disabling the Submit / Order Now button in Service portal of the Catalog item

Navyaa
Tera Expert

Hi All , 

I have requirement , based on the variable value i.e Yes/ No , the Submit / Order now button should be disabled.

If the value is 'No', the button should be disabled .

Can any please help in this .

Thanks ,

Navyaa

5 REPLIES 5

Shweta KHAJAPUR
Tera Guru

Write onSubmit catalog client script,

if(g_form.getValue("variable_name")=='yes'){
return true;
}else{
return false;
}

Hi Sweta , 

Thanks for the response .

But , I need for , when the form gets loaded and when the user changes  the value of the field as shown in the screenshot if selected as 'No' , the Order Now button has to be disabled.

Please help.

 

find_real_file.png

Service_RNow
Mega Sage

HI,

try yo this code:

If this is a submit button that would be seen from a Record Producer or Catalog Item, you could disable the Submit button using an onSubmit Catalog Client Script in the Record Producer/Catalog Item.

Ensure that the onSubmit Catalog Client Script has a UI Type of "Both", add in your conditional criteria for when you would want to disable the Submit button, and end that conditional criteria with "return false;" For instance:

function onSubmit() {

      if (g_form.getValue('subcategory') == 'DisableSubmit') {

              var message = '';

message = message + 'Submit is disabled for the specific subcategory' + '\n' + '\n';

              alert(message);

             return false;

      }

}

I hope that this helps,

Service_RNow
Mega Sage

Hi,

also, try this:

Go to system UI->Messages->search for "Order Now"->Replace message with "Submit" and save.

check this link you find some interesting information related :

Click Here

Please mark answer as correct if this answers your question.