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...
  • 4 months later...

Hi! If you would like to apply this article: https://howto.caspio.com/tech-tips-and-articles/disabling-inline-edit-option-in-reports-based-on-a-condition/ when Data Grouping is enabled.

You can change the code from 

const calculatedFieldPosition = 1

to

const calculatedFieldPosition = 2

 

1700735

 

Make sure that the Calculated Field (formula/condition) is in 2nd place of the DataPage Elements and the first is the field for Grouping.

Sample Result:

image.png

Link to comment
Share on other sites

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