Jump to content

Hide/Show Update button when certain condition is met

Recommended Posts

I have an Update page where I want to disallow users from updating the form when the CurrentProcess != 00 or 05

I have the following script placed in the footer, it works when there is only one condition [("[@field:CurrentProcess]" != "00")] but does not work when I include [|| ("[@field:CurrentProcess]" != "05")]. 

Is there anything wrong with the script?


document.addEventListener('DataPageReady', function (event) {
  if (("[@field:CurrentProcess]" != "00") || ("[@field:CurrentProcess]" != "05")) {
    document.getElementsByName("Mod0EditRecord").forEach(function(elem) {
      elem.style.display= 'none';



Link to comment
Share on other sites

Hi @beryllium,

A standard way of achieving this without using JavaScript is below:

  • Add a Header/Footer to your page.
  • Enter following code to hide the existing Update button:


              .cbUpdateButton {
                    display: none !important;


  • Add a new section and in it add an HTML Block.
  • Enter following code to add a custom Update button:

               <div id="update" align="center">
                         <input type="submit" class="cbSubmitButton" value="Update" />



  • Now add a Rule. It should look like below:



                Replace "Value" with your field name.

                I hope this helps.





Link to comment
Share on other sites

  • 3 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...