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, 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.

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
Community showcase
Posted Sep 25, 2018 in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

461 views 7 5
Join discussion

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