I want to customize my Jira and need to set a text input field to readonly in javascript / html. I got the following code already, which sets a default value into my customfield "summary":
window.ATL_JQ_PAGE_PROPS = $.extend(window.ATL_JQ_PAGE_PROPS, {
triggerFunction: function(showCollectorDialog) {
$('#feedback-button').on( 'click', function(e) {
e.preventDefault();
showCollectorDialog();
});
},
fieldValues: {
summary : 'Solution'
}
});
</script>
Next step would be to also set the "summary" to readonly, so users can't modify my predefined title anymore. I already tried "document.getElementById("summary").setAttribute("readonly", true);" and similar stuff but it didn't work out. Mayb I did something wrong since I'm not a programmer and someone has an advice?
Thanks in advance
HTMLcode then edit your answer and show what you've attempted and didn't work - I'll be able to help you better.<script></script>tag -JavaScriptcode goes between those tag,<input ... />code between your<body></body>tag.