Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to disable the 'Next' button in an Order Guide ?

Pascal Flt
Tera Contributor

Dear all,

In an Order Guide, is it possible to grey out (disable) the 'Next' button from a Catalog Client Script ?

Thank you in advance for your help.

Best regards.

1 ACCEPTED SOLUTION

Michael Jones -
Giga Sage

Would this be in the Service Portal?

You can do this with a little jQuery. Add something like this to your catalog client script. 

this.jQuery('#submit').prop('disabled', true);

Sometimes you need to wrap these in a timer if you're doing it onload. 

    setTimeout(function() {
        this.jQuery('#submit').prop('disabled', true);
    }, 500);
   

I hope this helps!

If this was helpful or correct, please be kind and remember to click appropriately!

Michael Jones - Proud member of the CloudPires team!

I hope this helps!
Michael D. Jones
Proud member of the GlideFast Consulting Team!

View solution in original post

6 REPLIES 6

Community Alums
Not applicable

Learning from other posts above (thank you all), here how I used UI POLICY Scripting to disable and enable the NEXT button in my ORDER GUIDE via my CATALOG ITEM.

- Configure your Catalog UI Policy as below:

-- Active = true

-- When to Apply = set your trigger conditions

-- Run scripts = true

-- Run scripts in UI type = All (IMPORTANT)

 

- Execute if true script:

 

 

 

function onCondition() {
    this.jQuery('#submit').prop('disabled', true); // or #submit-btn (inspect your HTML first)
}

 

 

 

- Execute if false script:

 

 

 

function onCondition() {	
    this.jQuery('#submit').prop('disabled', false); // or #submit-btn (inspect your HTML first)
}

 

 

 

 

NOTE- In my case (Catalog Item inside an Order Guide), I had to add the above second script to my order guide ON LOAD ui policy as well. This will re-enable the button in case the user clicks on PREVIOUS button while the NEXT button is disabled.

@Michael Jones - not working can you please send me Full onchange client script