- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2017 09:21 AM
Hi All,
I want to create an blue box Annotation and make it hide and re-appear through onChange() client script when the user change the state of the request. I know the coding for Client script except the Annotation ID. Please help me in finding Annotation ID.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2017 09:50 AM
I use below code to hide annotations , I have 3 annotations and i am hiding 3rd annotation.
var refs = document.getElementsByClassName("annotation-wrapper");
refs[3].style.display = 'none';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-19-2017 09:50 AM
I use below code to hide annotations , I have 3 annotations and i am hiding 3rd annotation.
var refs = document.getElementsByClassName("annotation-wrapper");
refs[3].style.display = 'none';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎12-07-2017 03:06 AM
Hi Asfaque,
Can you share client script?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-13-2019 07:28 PM
Just went through the pain of getting this to work and our developer fixed the following.
Created a UI policy against the field you want to show the annotation against. In this case, a 'Yes/No' field, annotation only to show on YES and hide when none or NO.
Script
execute if true
function onCondition() {
var refs3 = document.getElementsByClassName("annotation-wrapper");
refs3[24].style.display = 'block';
}
execute if false
function onCondition() {
var refs3 = document.getElementsByClassName("annotation-wrapper");
refs3[24].style.display = 'none';
}
This annotation is the 25th annotation, in 'form design' you count them 0-24.
The obvious problem to be aware of.
If annotations are added or removed above this annotation then the script will start hiding the new 25th annotation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-14-2019 01:18 AM
So we amended and added the label feature in the annotation to pick up specific annotation, no need to number them.
In the annotation you need to a a lablel.
<div id="annotation_label"> Annotation Text Goes Here </div>
UI Policy Script
execute if true
function onCondition() {
var refs3 = document.getElementById("annotation_label");
refs3.style.display = 'block';
refs3.parentElement.style.display = 'block';
}
execute if false
function onCondition() {
var refs3 = document.getElementById("annotation_label");
refs3.style.display = 'none';
refs3.parentElement.style.display = 'none';
}