Jump to content

Java Script to Hide the Update Button

Recommended Posts



I need to have a details page on and update form that has no action buttons at the bottom.  I was able to hide the BACK button with the following code:


display: none !important;

I also need to hide the UPDATE button as well - I have not be successful modifying the above code to accomplish this.   Can anyone help?



Link to comment
Share on other sites

It would be better to hide buttons from the Style directly.

  1. Create a new Style and apply it to the datapage you would hide the buttons from.
  2. Go to Source tab inside the new style and then select "All" from the left tree options under Datapage Elements section.
  3. Look for the type of container you are trying to hide, selections might be: cbSubmitButtonContainer, cbBackButtonContainer, cbDeleteButtonContainer, cbSearchButtonContainer, cbLoginButtonContainer, cbUpdateButtonContainer, cbPasswordRecoveryButtonContainer, cbPasswordResetButtonContainer
  4. Find what you are looking for and add the following line inside the class attributes: display: none;

That way you will be hidding the buttons you want from the datapages you want without using JS.

I hope it helps

Link to comment
Share on other sites

  • 1 year later...

 Keep in mind hiding these buttons through CSS will not disable them. If anyone presses 'Enter' they will be able to 'click' the button.

You need JavaScript to disable it completely and then use CSS for hiding, or you can use JavaScript for both. For Submission, you do it like:


document.getElementsByClassName('cbSubmitButton')[0].disabled = true;
document.getElementsByClassName('cbSubmitButton')[0].style.display = 'none';


Update Form/Details Page


document.getElementsByClassName('cbUpdateButton')[0].disabled = true;
document.getElementsByClassName('cbUpdateButton')[0].style.display = 'none'; 


If you have multiple forms on a single Webpage, just change 0 to any number depending on the order of the forms, 0 means it's the first form, and so on.


If you just really want to hide, then just remove the 1st line.

Link to comment
Share on other sites

  • 6 months later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...