Hi,
I have a checkbox custom field named 'Fruits' and value Requested.
And other 3 more custom fields.
When user clicks Requested it should shows other 3 custom fields else not.
Prior to that all 3 custom fields must be hidden.
You will need some code to do that. Either a custom field type that can support it, or injected javascript.
The Behaviours module in the script runner add-on can do this too, it does the javascript for you.
Yes Nic,
I am using this below code using JavaScript through the plugin
function fruitnewField(){
$('#customfield_14201-1').click(function() { // Fruit cf
if (document.getElementById('customfield_14201-1').checked){ AJS.$("#customfield_14202").closest('div.field-group').show(); //other cf
AJS.$(":input[name='customfield_14203']").closest('fieldset.group').show(); //other cf
AJS.$("#customfield_14204").closest('div.field-group').show(); //other cf
}
else{
AJS.$("#customfield_14202").closest('div.field-group').hide();
AJS.$(":input[name='customfield_14203']").closest('fieldset.group').hide();
AJS.$("#customfield_14204").closest('div.field-group').hide();
}
});
When I checked check box other cf are shows and when I unchecked it cf are hides.
But the problem is how to hide these other custom fields on the load of create screen when the check box is unchecked defaultly.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.