Hi , How can i make a custom field invisible

The custom field which is to be made invisible contains the java script related to another custom field.

3 answers

1 vote

Use a message custom field from the Jira toolkit - they're naturally invisible if you fill their text with stuff that won't be rendered as text.

Or use javascript to flag the field area as "hidden"

Or, do the same (use the hidden attribute) if your field is a plugin you're writing, as you'll have control over the content of the .vm for it.

the problem is like

I created a custom field which is of Multi Checkboxes type. When I click in this check box , a new free text field is to be made visible. For this I created a new text field(eg custom field A) where I can enter the corresponding java script. I need to make this A invisible.

Hi Athira,

Use this code for hiding the customfield by default and you can display it when you want i.e. when the check box is checked.

var customField_Name = document.getElementById('customfield_11836'); //ID is temp

if(customField_Name.parentElement) {
customField_Name=customField_Name.parentElement;
} else if(customField_Name.parentNode) {
customField_Name=customField_Name.parentNode;
}

customField_Name.style.display ='none';

And use customField_Name.style.display =''; for making this visible field.

~ Nikhil.

Thanks Nikhil and Nic. It is working fine now

-Athira

If the custom field type of the custom field is something you've written, you can define a resource in atlassian-plugin.xml that refers to a javascript file in the plugin, then use the webResourceManager to make sure that the javascript is loaded properly on the page where the custom field wants it.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Friday in Agile

Are you a Jira Service Desk agent? We want to talk to you!

Are you a whiz at handling tickets and looking at how you can further optimize your workflow with automation? Do you tackle detailed customer support questions while simultaneously getting flooded wi...

97 views 0 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you