Hi,
I have added custom message field on the transition screen and I would like to make that message field popup and popoff based on the checkbox selection.
The checkbox name is 'Common Component Change Request' and value 'Not Requested' if user didnot check this box then only I want to show this message else not.
How to do that?
You can try to inject your own javascript, but you would be better off with an add-on that does it internally (as injection is difficult, ugly and often fails)
Script Runner has the Behaviours module which pretty much had show/hide other field as it's first reason to exist. There are others, including Dynamic Forms as Daniel mentions which can enable it
Hi Nic,
I tried injecting my javascript in field configuration and even in custom field's edit default values but it didnt work.
My code will be like this:
//Common Component cf_14503
//Message field cf _4300
$('#customfield_14503-2').click(function () {
if (document.getElementById('customfield_14503-2').checked) {
AJS.$("#customfield_14300").closest('div.field-group').hide();
}
else{
AJS.$("#customfield_14300").closest('div.field-group').show();
}}
I dont no much information on javascript and where would you suggest to apply this code to affect.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Atlassian have been removing the abilty to inject dubious javascript like that. The only place it works now is in the announcement banner.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Nic,
I tried it in the announcement banner but didnt work for me either.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is the javascript injected ok, and just not appearing to run? Use the debug tools in the browser to find it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It works for other custom fields but not for message field.
Let me find it in the debug tools.
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
have you tried to use add-on Dynamic Forms? There are several custom fields that can show and hide other custom field depending on selected value. I think that dynamic check box is what you are looking for.
I hope I've helped you.
Best Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Deniel,
I really appreciate you response.
Actually we are using that message field only one place. Does it seems expensive to buy add-on for less usage.
What would you say?
Thanks
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.