If i have take drop down field - "type of content" where i have given 4 options as dropdown (please refer to the image attached). In this, i also have an option as 'others'. If i chose others i should get an option to write my own text . How can this be achieved ? Please reply with a solution-
In the below script i have take test field(with drop down with 'others' as an option), if i click on others i should get a test field to fill in my requirement. The below code does not work for me
<script type="text/javascript">
priority = document.getElementById('Test field');
if (Test field) {
target = document.getElementById('customfield_26823');
// Hide the target field if priority isn't critical
if (Test field.value!= others) target.style.display='none';
priority.onchange=function() {
if (this.value == 2) {
target.style.display = '';
target.value="enter your message here";
} else {
target.style.display='none';
}
}
}
</script>
Hello,
You could use such plugins as Adaptivist ScriptRunner(behaviours) or Power Scripts(Live fields) instead of writing your own JavaScript
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.