cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
728
Views
0
Helpful
4
Replies

How to Disable the Add & Review Button

Brandy DeMarco
Level 1
Level 1

How to Disable the Add & Review Button

 *Updated with the correct ISF  code (the previous code, in case you saved it, was to actually  escape apostrophes.  That will be posted  seperately. 

Note that this solution might not work in your environment - you might have to modify it based on your installation.

Enjoy! 

Common_disableAddAndReviewButton()
{
   if ( Moment == 'ordering' )
   {
        var theForm = document.forms[0];
        var buttonCt = 0;
      
        for( i = 0; i < theForm.elements.length; i++ )
        {     
             if( theForm.elements[i].type == "submit" )
            {
                if ( buttonCt == 0 || buttonCt == 2 )
                {
                    theForm.elements[i].disabled = true;
                     theForm.elements[i].style.visibility="hidden";                  
                } 
                 buttonCt++;              
             }     
       }

    }

}

4 Replies 4

Sorry I have not worked with ISF lately, but where would you put this?

Wendy Howerton
Level 1
Level 1

This is GREAT - I added a new Java Script and set it to "when form is loaded" and when I did some test reqs - no Add & Review button !!!!

Brandy DeMarco
Level 1
Level 1

To apply this to all services, if you have RC 2006, in script manager, under the "Add this script to the following events on all forms" heading, you just need to check the box in the script manager when you're creating this script that says "when the form is loaded."

Thanks!!!  This has been a major pain point for us for quite some time.