Add Placeholder Text to Custom Field

Kyle Mitofsky August 17, 2014

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.

3 answers

1 accepted

2 votes
Answer accepted
Alexey_Rjeutski__Polontech_
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.
August 17, 2014

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.

Kyle Mitofsky August 17, 2014

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.


Tej February 24, 2017

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.

Deleted user October 10, 2018

Hi guys, just follow up to this, can I remove Custom Field name in Portal and Put it just as Placeholder? 

 

Customer is trying to save as much space as possible.

1 vote
Antoine BELLIOT February 11, 2021

Is there any other solution since 2014 to put a placeholder in the comment ?
Actually, we use the comment to create a new JIRA on another project. In this case, we have to type some specific information and sometimes, some are forgotten. So the placeholder should be very useful.

1 vote
André Pereira December 22, 2014

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