The CreatorCon Call for Content is officially open! Get started here.

How to disable submit button on the form

Sneha39
Mega Guru

Hi,
Can we disable submit button on any form ?

if yes will this process be same if I want to hide any other button like ''New'' etc ?

Kindly let me know all the possible ways to do this.

Thanks in advance

2 REPLIES 2

lSurya 24
Giga Guru

Hello Sneha,



Yes, you can hide submit button by adding a condition on Submit UI action in UI actions.


To hide new buttons on related lists. you can click on configure -> list layout and omit new buttons.



Hide Form Button


AbdulAzeez
Mega Guru

Hello,



Yes you can hide Submit button on the form,



That can be done in 2 ways:



1) OOB you can go to UI Action and filter particular Submit button depend on the condition you can hide


2) on Load client script:



function onLoad() {


    //Type appropriate comment here, and begin script below


                 


var state = g_form.getValue('state');



alert(state);



if(state == 2) // if the state =2 it hides


{


              alert("Hiding Submit button");


      var items = $$('BUTTON').each(function(item){


    if(item.innerHTML.indexOf('Submit') > -1){


          item.hide();


    }


});}


}