I have developed a custom field and this custom field pops up during "Resolve" transition. The requirement is that based on this custom field value selection, i need to hide/show componenet/s field on the same transition screen.
What i have been thinking is that, I will add Component/s field as required fields during "Resolve" transition so that component/s are displayed and allowed to edit during "Resolve" transition. All I have to do is to write a jQuery piece of code in my "<customfield>-edit.vm" that can hide/show the componenets field. So how to tweak jQuery code to access component/s Div or panel to hide/show is the point where am struck right now. Any thoughts would be very helpful.
Soon as "Resolve" screen loads, component/s field show be hidden. How to do this using jQuery?
And if i get to know how to hide, I can easily write for show() based on the custom field value that users select.
Cheers,
Jo
Community moderators have prevented the ability to post new answers.
I can give you the relevant selectors to do this, although it is a bit of a pain for popup dialogs. However I think you should avoid reinventing the wheel by using the behaviours plugin. For your requirements you would create a new behaviour, add the custom field, click "Add serverside script", then type in:
FormField selectList = getFieldById(getFieldChanged()) FormField comps = getFieldById("components") boolean showComps = selectList.getValue() == "THE SPECIAL VALUE" comps.setHidden(showComps)
Then apply the behaviour to your project, and it should all work (but this script untested).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jamie for your reply. But how to achieve this through a scripting language?
i tried document.getElementBy("#component").hide() and jQuery("#component").hide()
but no luck!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
AJS.$("#components").parent().hide()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Jamie, but AJS too was not able to hide the filed. So i am trying out your plugin now..
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.