Jump to content

Disable inline edit


Recommended Posts

Is there a way to disable inline edit when one field is "No."

I have an activities table where I can assign a person in-charge but clicking DETAILS and I make the edits in the details page. 
But if the activity is already deactivated (Field data is NO), is there a way to hide the record button DETAILS?
 

Link to comment
Share on other sites

It did not work, I must be doing something here:

<script>
  
  var condition = ("[@field:Schedules_ACTIVE^]" == 'N'); //Your condition
  
  /*Edits are not necessary from this point onward */
  var deleteButtons = document.querySelectorAll('[data-cb-name="DetailsLink"]');
  
  if(condition) {
   deleteButtons.forEach(function (elem) {
      elem.style.display = "none";
    });
  }
  
</script>

Link to comment
Share on other sites

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

Guest
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.

Loading...
×
×
  • Create New...