Hi , How can i make a custom field invisible

Athira K P September 11, 2011

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

3 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Nic Brough -Adaptavist-
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 11, 2011

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.

Athira K P September 11, 2011

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.

0 votes
MattS
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 12, 2011

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.

0 votes
Nikhil Naoghare September 11, 2011

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.

Athira K P September 12, 2011

Thanks Nikhil and Nic. It is working fine now

-Athira

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events