Cms: Ability to rename fields from the Field Layout Designer

Created on 31 Jan 2017  Â·  12Comments  Â·  Source: craftcms/cms

Created by: Neal Stammers ([email protected]) on 2015/03/10 18:02:16 +0000
Votes at time of UserVoice import: 232


Some fields can be re-used in many sections, but having a single label is often not ideal.

For example; you may create a simple 'plain text' field.

When adding to multiple sections you would be able to rename the label so the UI was clearer. e.g.

'Article excerpt' or 'Section intro'

Individual templates/macros could handle the different use cases, but would reduce the number of similar fields in the admin area

authoring enhancement

Most helpful comment

As of the next Craft 3.5 release, it will be possible to customize fields’ titles and instructions (including Title fields), from within the field layout designer.

A screenshot of a field layout designer with visible Label and Instruction fields for a field

All 12 comments

> Posted by Narration SD ([email protected]) on 2015/04/14 16:07:09 +0000

Liking this a lot after finding it ;)

i had been thinking of asking for 'field aliases' to have same renaming purposes.

Some of the proposals are interesting, but for my money (?) just the ability to re-use the field def by renaming would accomplish a great deal. No complications then also.

> Posted by Benjamin Fleming ([email protected]) on 2015/12/06 01:09:14 +0000

Just released today! https://github.com/benjamminf/craft-relabel

> Posted by Benjamin Fleming ([email protected]) on 2015/12/06 01:09:14 +0000

@Florian appreciate the link to my plugin!

Though I'm actually working on a new plugin that does exactly this:
https://github.com/benjamminf/craft-relabel
I expect to have something functioning by the end of the week

> Posted by Florian ([email protected]) on 2015/03/13 06:38:29 +0000

This for now is nearly exactly what is needed (as a quick solution for this)
Helps heaps already...should go into core in my humble opinion:
https://github.com/benjamminf/craft-quick-field

> Posted by Mats Mikkel Rummelhoff ([email protected]) on 2015/03/09 00:12:31 +0000

@Christian – Yes, that's exactly what I'm picturing, sorry for repeating your previous comment :)

> Posted by Christian ([email protected]) on 2015/03/09 00:49:13 +0000

@Mats @Neal yes, that's exactly what I meant with my previous comment. I should work on improving my english!!

The Field Layout Designer has this little config gear next to each field (to remove a field or make it required). This is where the new settings could go "Set Name" and "Set Instructions".

And in the field settings (settings > fields > my field) you'd just set defaults for name and instruction.

> Posted by Neal Stammers ([email protected]) on 2015/03/10 18:02:16 +0000

@Mats yep - that sounds right, but would extend, if possible, to include the ability to also set the helper text.

It basically the same as the 'Title' field. That's its default label, but you can override on a per-use basis.

> Posted by Mats Mikkel Rummelhoff ([email protected]) on 2015/03/09 00:12:31 +0000

Really, this boils down to being able to define different CP UI labels for the same field across different entry types/field layouts?

The simplest possible implementation I could imagine, is that the FieldLayoutModel is extended with an array of field aliases (or labels, as it were).

It could work like this: Whenever you assign a specific field (e.g. "Article Excerpt", with the handle "articleExcerpt") to a field layout, you have the option to give that field an alias. The alias is used as the field's label in the CP UI for that specific entry type, but nowhere else – for example you'd still need to use the actual handle ("articleExcerpt") in templates and whatnot.

This would go a long way in increasing field re-use and UI semantics. If an "excerpt" is an "excerpt", it makes total sense to not create multiple fields doing exactly the same thing, just to be able to have an entry type field layout that makes sense semantically/contextually for the client.

> Posted by Neal Stammers ([email protected]) on 2015/03/10 18:02:16 +0000

@Ben - Just to clarify - The request is not for multiple instances, but rather a single instance with the ability to amend the title and/or instruction text on a per-use basis.

I feel that @Patrick's suggestion of being able to define every setting when adding it to the field designer would end up getting complicated very quickly, and this is not something I'm 'arguing' for.

> Posted by Ben Parizek ([email protected]) on 2015/03/12 23:19:32 +0000

The name of this feature request is misleading. It proposes a simple quick-edit feature in the title and goes on to argue for multiple instances of a single field type which is an architectural change which would completely change the UI and make the request to make things easier to edit theoretical because we are not familiar with what the UI would even look like.

I'm in the camp that thinks this may get complicated quickly and that the tradeoffs in the UI of managing multiple and varying instances of the same field type may be worse than the alternative, of just having to manage multiple fields.

I do agree with the heart of this request. Craft could use better tools for quickly updating and managing fields and perhaps even creating new fields. If such updates to the current implementation of fields was done well, it may not even be necessary to consider making fields more complex.

This would be resolved by #1524.

As of the next Craft 3.5 release, it will be possible to customize fields’ titles and instructions (including Title fields), from within the field layout designer.

A screenshot of a field layout designer with visible Label and Instruction fields for a field

Was this page helpful?
0 / 5 - 0 ratings