Wernon Posted February 4, 2019 Report Share Posted February 4, 2019 I have an issue with the case on the report page, where the field should be active for adding or visible (hidden before). Details: I have a dropdown for answer revision with three status variants: Pending, Approved and Not Approved. The changes are provided via inline edit. If the message status is not approved I should be able to write a comment, but for the other cases window should not appear or should not be editable. It would be nice if somebody can help me with this case. Thanks. Quote Link to comment Share on other sites More sharing options...
George43 Posted February 4, 2019 Report Share Posted February 4, 2019 This solution is for hiding Inline edit elements for certain conditions on Report Data Page. For Hiding element with "Comment" label if value in dropdown with "Approved" label is not equal "Not Approved" If need can applied more complex conditions by modifying If Statemets. <script type="text/javascript"> document.addEventListener('DOMSubtreeModified', function(){ var InlineEditApproved=document.getElementsByName("InlineEditApproved")[0]; var InlineEditComment=document.getElementsByName("InlineEditComment")[0]; if(InlineEditApproved && InlineEditComment){ if(InlineEditApproved.value!="Not Approved"){ InlineEditComment.style.display="none"; } InlineEditApproved.addEventListener('change', function(){ if (InlineEditApproved.value=="Not Approved"){ InlineEditComment.style.display="block"; } else{ InlineEditComment.style.display="none"; } }); }else{ return false; } }); </script> Info: InlineEditApproved-InlineEdit+(Name of dropdown) InlineEditComment-InlineEdit+(Name of comment label) Not Approved-Condition of dropdown element can be modified Quote Link to comment Share on other sites More sharing options...
Kurumi Posted June 25 Report Share Posted June 25 Hi @Wernon - you can check this post for reference Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.