Add Placeholder Text to Custom Field

Can I add the placeholder attribute to a custom JIRA field in order to present additional info?

It seems I have control over the following properties for a given field:

Edit Field Details:

  • Field Name
  • Description
  • Search Templace

Configure Custom Field:

  • Aplicable Contexts for Scheme
    • Applicable Issue Type
    • Applicable Projects
  • Default Value

Field Configuartion:

  • Visibility
  • Required
  • Render Mode

But I can't find anywhere to modify the placeholder text

The placeholder attribute isn't guaranteed across every browser, but it would be a nice touch to provide additional information for supported browsers.

Here's a complete list of custom field configurations, but I don't see it there.

It might be possible to do with javascript in the element description, but a native option would be much better.

2 answers

1 accepted

1. As the simpliest option - modify "atlassian-jira\WEB-INF\classes\templates\plugins\fields\edit\edit-basictext.vm" this velocity and add placeholder ability (i.e. use description as a placeholder)

2. You can develop your own custom field with full support of placeholders in input.

Just to flesh out option 1

1) You'll have to find your home directory and then navigate to

\atlassian-jira\WEB-INF\classes\templates\plugins\fields\edit\

On my instance, it was right here:

C:\Program Files\Atlassian\JIRA\atlassian-jira\WEB-INF\classes\templates\plugins\fields\edit

2) Then open up the velocity templace file named edit-basictext.vm

Then add the following code to the input element:

placeholder="$fieldLayoutItem.fieldDescription"

3) You'll need to refresh the template cache after making changes:

You can do so by restarting JIRA, or changing the velocity.properties.

I couldn't quite get it to work, but that was what I had tried so far.


Hi Alexey,

Is there a way we can achieve this (placeholder) adding script or editing from UI side because I don't have access to the server.

Thanks

Tej.

hi guys, how can i do the same, but for the multi-select component?

thanks

 

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 6 hours ago in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

86 views 4 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you