Allow some field settings to be overridden from the field layout designer #8688
-
If I create a field for example "Related Entry" with a limit of 1, I can only use this in other field layouts where only one related entry is also desired. Resulting in me having to create multiple fields for essentially the same purpose, with slight variations in the settings. If the Limit could be set on the field layout, that would be great; I don't expect this to be easy as "limit" isn't a global setting same as the "required" flag is. Maybe you could add an extra column in the fieldlayoutfields table which could accommodate some non global settings and grab the limit from there? What do you think @brandonkelly ? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments
-
I’m not sure I’m following. The “Branch Limit” setting is currently only available on Categories fields, not Users fields. Is “Related User” a Categories field? Or did you mean the “Limit” setting? |
Beta Was this translation helpful? Give feedback.
-
@brandonkelly Apologies I meant limit, not branch limit (i've edited for clarity). My real life example was actually to do with entries, I have to create an additional field pointing at exactly the same entry source for the same purpose just because the limit is global to that field. |
Beta Was this translation helpful? Give feedback.
-
Gotcha. It’s similar to #806 (ability to rename fields from the field layout designer) and #841 (ability to override the field instructions from the field layout designer). We have plans to explore all of this (including overriding field type-specific settings) from the field layout designer as part of a larger content refactoring project we’re planning for Craft 4 (#1524). Good to have specific issues we can reference as we’re working on the changes, though, so I will keep this open and add it to the 4.0 milestone. |
Beta Was this translation helpful? Give feedback.
-
thanks @brandonkelly |
Beta Was this translation helpful? Give feedback.
-
We have decided not to implement this feature, as it would end up being a little overly complicated. Some field types have different Update: I reconsidered for Craft 5 since fields no longer have For field instance label overrides, if you leave the input blank, the global field name will be used, and there is an explicit “Hide” checkbox you need to tick if you want the label to be blank. If custom fields were to start including per-instance setting overrides, they would need to render them separately from the main settings, so each setting could have some similar affordance that determines whether the override value should be respected. A dropdown setting would need to start including a “Use default value” option; a checkbox list would need to be conditional based on some parent “Override [Setting Name]” toggle, etc. It would get messy. |
Beta Was this translation helpful? Give feedback.
-
Hi @brandonkelly A good example of this is a generic 'gallery' field, we always end up having to have several fields basically doing the same thing just to configure those values, which also makes the templating components more complex by specifying field handles for them rather than drop in partials. |
Beta Was this translation helpful? Give feedback.
-
Hi, ability to override field values/settings per instance would be useful. |
Beta Was this translation helpful? Give feedback.
We have decided not to implement this feature, as it would end up being a little overly complicated. Some field types have different
content
column types depending on their settings, and it would be annoying for field types to need to somehow identify which settings are safe to be overridden, versus not.Update: I reconsidered for Craft 5 since fields no longer have
content
columns, however it’s not clear how we’d tackle it from the UI.For field instance label overrides, if you leave the input blank, the global field name will be used, and there is an explicit “Hide” checkbox you need to tick if you want the label to be blank.
If custom fields were to start including per-instance setting…