Disable submit button in catalog item

Anantha27
Mega Guru

I need to disable the submit button in catalog item on service portal and employee center as well. Is this possible to perform this through catalog client script?

7 REPLIES 7

Prasanna_Patil
Kilo Sage

I too have same question, whats your next step after disabling? How end users can submit the form

Nishant8
Tera Sage

Hello @Anantha27, I think you can't hide it normally without manipulating the DOM, which is not advisable. You can think of writing a simple 'On Submit' client script to stop the submission with below code.

    function onSubmit() {
            g_form.addErrorMessage('You cannot submit this form');
            return false;
    }

 

Regards,

Nishant

Ehab Pilloor
Giga Sage

Hi @Anantha27,

 

What is the business requirement for this?

 

You can disable via onSubmit client script:

g_form.addErrorMessage('Invalid submission.');
return false;

 

return false invalidates submission. Im interested to know the usecase for this requirement if you could share?

 

Regards,

Ehab Pilloor