Could it be possible to remove "Title" from the label display?

Let me give you a brief example why I need this:
I am using the link field to provide the a client's name and website inside a project content type. In the node form, the label for the link field shows "Client title:", which some users would understand as "Mr, Sir, whatever...". It would make much more sense if we could use a custom string, and then show something like "Client name:" or simply "Client"

This is aggravated when we use other languages. In Spanish, for instance, both words are in the wrong order, and generate meaningless information. (I have tried using the String overrides module to get around this, but to no avail)

This issue is may be related to #1178064: Change "title" label and "url" label on field settings

Members fund testing for the Drupal project. Drupal Association Learn more


jcfiala’s picture

Status: Active » Closed (duplicate)

Yeah, this issue is directly related to #1178064: Change "title" label and "url" label on field settings, so I'm going to close it as a duplicate. I suggest you use the code snippet from that ticket as a guide for changing how that's displayed.

castawaybcn’s picture

Thanks for pointing me to the solution, will check it out asap.

markabur’s picture

Category: feature » support
Status: Closed (duplicate) » Active

How would this work for Drupal 6? #1178064: Change "title" label and "url" label on field settings uses hook_element_info_alter() which is D7 only.

diqidoq’s picture

Due to the mass of repeating feature requests regarding the additional title field, the title field teeters on the brink. I would like to provide some info here about how you can reach your goal:

  1. use the link field for its main purpose and fill the link field with a link
  2. use the text field for its main purpose and fill it with text
  3. call it link title if you want
  4. combine them both to a field group (even for multiple values) with the module field_collection.

And e viola, here is your link field with a title which supports all the features, which are combinable with text fields like, tokens, html markup, translation and many more. You can even have 20 titles if you want. Or one title for 5 links?

It seems that we decided to leave the title field in (other issue discussion). So this comment here is confusing, that's why I -del- it.

diqidoq’s picture

Status: Active » Closed (works as designed)
Issue tags: +link module title text field


castawaybcn’s picture

Sorry if I am not getting this right, but field collection is for D7 only, and although I have not used it I think it affects the output of the field, not the form, which was the original reason for opening this issue.

diqidoq’s picture

castawaybcn, Yes thats right. field_collection d7 only. I had to -del- the above comment to prevent confusion, but from reading trhu' it and yours and this here, the meaning gets clear.

I still have one other question, is there a d6 solution out there to style your forms like in d7 with DisplaySuite ?

castawaybcn’s picture

In D6 the only styling I use is the one provided by vertical tabs, which as I understand made it into core in D7. A quick search returned the Arrange Fields module, but I haven't tried it myself.

franz’s picture

Status: Closed (works as designed) » Needs review
802 bytes

Regardless of what is said, it is a terrible practice for i18n to just "glue" strings like if all languages would use them in that order ([label] Title). As I'm translating a D6 site and spent a long time trying to find where I had to go in and change this. Unfortunately, translating the terms separatedely just won't be enough. This patch makes the string translatable as "@label URL" and "@label Title".

redndahead’s picture

Version: 6.x-2.9 » 7.x-1.x-dev
Issue summary: View changes
2.26 KB

I'm going to throw my hat into the ring with a completely different approach. I can see that these type of requests have been batted down for one reason or another, but I think this approach may work.

This patch adds a checkbox that makes the field label become the label for the Title field. It will then hide the field label. This allows the string to still be translatable and if one needs a larger wrapper they can use fieldsets to accomplish that.

redndahead’s picture

2.29 KB

The previous patch had issues showing error messages and the default value was set incorrectly. Since there is a nice option to set the label to invisible this patch utilizes it.

RobLoach’s picture

Title: Remove or customize "Title" from the label display? (not title as in link attribute) » Use field label as the label for the title field
Status: Needs review » Reviewed & tested by the community
diqidoq’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: -link module title text field

After seeing RobLoachs reply, I've also tested it and it works here without any issues as well ... I'll push it against latest link-7.x-dev. Will be up next days. Feel free to re-open the issue if I missed any flaw by testing ...

Thanks to all.

INFO: I removed the random issue tags "link module title text field", since these tags are random and not needed. Before adding tags read the issue tag guidelines. Do NOT use tags for adding random keywords or duplicating any other fields. Separate terms with a comma, not a space.

  • Commit 334b6e3 on 7.x-1.x authored by redndahead, committed by Digidog:
    Issue #1266474 by redndahead, franz, RobLoach, jcfiala, markabur: Use...
diqidoq’s picture

Status: Fixed » Closed (fixed)