We have a details DataPage that includes information common to multiple authenticated users. We want to include an [EDIT] button in the header but only for certain authorized users. We control that access with a checkbox and the checkbox field is included in the view used for the authentications. I basically want to have either a link or a message explaining why they can't edit it.
<script type="text/javascript">
document.addEventListener('DataPageReady', function(event){
if("[@authfield:Editor^]" == "Yes"){
<a href="https://domain.com/edit_page?id=[@id]">EDIT</a>;
}
else{
<span>Only authorized employees are allowed to edit their company information.</span>;
}
});
</script>
The EDIT link does not show up on my datapage where this Header is located. What am I missing?
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.
Question
Peterson
We have a details DataPage that includes information common to multiple authenticated users. We want to include an [EDIT] button in the header but only for certain authorized users. We control that access with a checkbox and the checkbox field is included in the view used for the authentications. I basically want to have either a link or a message explaining why they can't edit it.
<script type="text/javascript">
document.addEventListener('DataPageReady', function(event){
if("[@authfield:Editor^]" == "Yes"){
<a href="https://domain.com/edit_page?id=[@id]">EDIT</a>;
}
else{
<span>Only authorized employees are allowed to edit their company information.</span>;
}
});
</script>
The EDIT link does not show up on my datapage where this Header is located. What am I missing?
Link to comment
Share on other sites
2 answers to this question
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.