I went to find certain community questions about add placeholder text or hint text into custom field, and found that the answer is to use JavaScript like:
<script type="text/javascript">
document.getElementsByName('customfield_10700')[0].placeholder='This will appear as a placeholder';
</script>
place into custom field's description, but it didn't work at all like below:
It displayed at below the field instead of display inside the field.
Any suggest solutions to add placeholder/hint text into field?
Hello,
The method you suggest is not available on cloud, only on server and DC.
If you want to achieve this you'll have to use context for this specific field and add a default value. While this is not perfect because it fill the field with a real value you don't want to keep you can also try thid other way:
Adding the 'hint' into the description of the custom field, by adding the as a specific field configuration.
Alternatively (but less clean) you can add this information into abother field (the show only field).
Hope this help!
Hi,
I noticed that the different between cloud and Server/DC, as I checked from my site, is it considered as Server/DC?
Sorry if I choose wrong hosting type.
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That seems like DC.
Do you have 'Enable HTML in field descriptions and list item values' enabled in General configuration (/secure/admin/ViewApplicationProperties.jspa)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That depends on your team and if your (global) Jira administrators can be trusted, since at the end of the day, running any javascript with authenticated users could be a serious problem.
I mean I suppose we're talking XSS scripting effectively (https://owasp.org/www-community/attacks/xss/).
In general I would say enabling this is fine, but you should probably decide that on your own.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I see, what if the field is user picker field, is it able to display placeholder text into it?
I try to enable 'Enable HTML in field descriptions and list item values' and the normal text field able to show the placeholder/hint text in the field, but unable to show for user picker field.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
It could be a limitation, but TBH you should try to avoid adding text into a field not supposed to manage text.
hope this helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for all your responses and answers.
I had a discussion with our team and we decided not to enable the 'Enable HTML in field descriptions and list item values' as will impact other application.
So we will put the hint text below the field instead of inside the field as placeholder.
Once again thanks for the discussion and I'll accept this as answer.
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.