Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 19:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Text Field Appear after clicking Radio button

Dishant Mehta February 16, 2015

Hi,

 

I want to add two Radio button Yes or No and when user clicks “Yes” a text box should then appear so users can “Add Details”.

I am unable to find any option. Can anyone please help me on this?

 

Thanks!

2 answers

0 votes
Dishant Mehta February 17, 2015

Hi Sana,

 

Is it possible to add jQuery script on Cloud?

SanaS
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.
February 17, 2015

it should be possible, try putting some jQuery in a field description and see what happens :)

dishant.mehta
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 17, 2015

Sana - Do you have any example? Can you please share the screenshot where I should add the jQuery on Cloud instance?

SanaS
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.
February 17, 2015

You go to the field configuration scheme for the project/issue type and then you choose some field (e.g. the radio field) and press edit. There you will have a text area that you can put code into it. You can test with this for instance (taken from https://answers.atlassian.com/questions/84648/javascript-in-field-description-not-working-when-first-opening-create-issue-dialog): <script type="text/javascript"> AJS.$(document).ready(function($) { runJS(); JIRA.bind(JIRA.Events.NEW_CONTENT_ADDED, function (e,context) { runJS(); }); function runJS() { // Hide 'JavaScript' field AJS.$("#customfield_10201").closest('div.field-group').hide(); } }); </script> Remember to update with your own custom field id.

Azwandi Mohd Aris
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.
February 18, 2015

Just to clarify that it is not possible to add HTML/Javascript code in issue fields in JIRA Cloud. The code will be regarded as a plain text. This is part of the restricted functions in JIRA Cloud (see https://confluence.atlassian.com/display/Cloud/Restricted+Functions+in+Cloud+Applications): "This feature creates an XSS vulnerability that could allow malicious users to gain system administrator permissions and use the Cloud infrastructure for nefarious purposes. Wiki markup is still available."

0 votes
SanaS
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.
February 17, 2015

Hi,

this can be done using jQuery. You need to add some scripts in the field description for one of your fields, for instance the radio button field, which hides and shows the other field depending on the radio button.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events