Hi,
I've configured a Rich Text multiline text field to show a default value including a table, yet I wrote a jquery script in order for this field to show or hide depending on the selection made on a single select dropdown list.
When I enter my script on the description of the single select dropdown list and test it, when I run my test case for the field to be hidden; I can not see it on the Edit screen (as expected), but the field shows with the table on the View screen.
function hideShowRichTextTable(isRequired) {
var dropdownFieldValue = $('#customfield_813082').val();
var showForDropdownTypes = ["19417", "19418"];
if (showForDropdownTypes.indexOf(dropdownFieldValue) > -1) {
$('#customfield_813588').closest('div.field-group').show();
}
else {
$('#customfield_813588').closest('div.field-group').hide();
$('#customfield_813588').val('');
}
}
I've tried to add the table with jquery but the field only shows the "text" and not the "visual" table.
I've also tried to use the .reset() and it didn't cleared the default value entered and the field still showing on the View screen.
Any idea on how can I pull this off?
I'm using JIRA Server v7.6.0
Thanks for the assistance.
If you're adding the script to the field description, it won't be called on the View screen because the description text only renders on the Edit screen.
There are some other areas you can inject the script:
Several of these options and their merits are discussed in this thread.
Cheers,
Daniel
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.