This seems like a really useful module.
But I'm missing one important opportunity: to be able to create and select predefined "global" empty texts from a list in view modes.
This way these values could be created only once, and be applied to multiple fields without having to type a custom text to all fields. When having to modify the custom text, which is the same for all fields, this have to be modified for every fields separately (which is really uncomfortable).

Here's a quick illustration of what I think about:

new option:
http://i.imgur.com/qoK0f.png
select list opened:
http://i.imgur.com/IxqOB.png

Empty fields - predefined texts
Empty fields - predefined texts

Thanks in advance and keep up the good work!

Comments

rypit’s picture

Priority: Major » Normal

This is an interesting concept but consider that the configuration needs to be embeddable in the display settings for the entity so it is exportable via features. In order to support something like what you're suggesting I think we'd end up needing to store configuration data somewhere else, and reference it when it's configured to be displayed.

This would make exporting the configuration pretty complicated. We'd have to use something like ctools to maintain a "copy" of the entity-field-instance configuration for each place empty field configuration is used (which is a bit redundant because we can already export it where it lives in the entity) or use the variable table which seems a little kludgy too.

Luckily, with the 2-x branch, it is very easy to roll your own empty field handler which could behave any way you wanted it to. I'd suggest looking at that and rolling an empty fields plugin if you need a way to centrally manage your empty field reactions. Perhaps your plugin could provide a dropdown list of the messages you'd want to display. For an example on how that would look, take a look at the Empty Fields text plugin in the 2-x branch.

Sk8erPeter’s picture

OK, thanks, since then, I'm using Empty fields callbacks by implementing hook_empty_field_callbacks() in my own module without any problem, so this behaves like a "predefined text". :) This is enough for me, I'm satisfied with that, I also like that I can keep it in my own module's code, and modify it easily.

So this is enough for me and others who know how to create a module, BUT maybe someone doesn't have a clue how to create one, so maybe he/she would be happy to have this feature: creating "predefined texts" via a UI, and being able to select them later on "Manage display" tab.
Yes, maybe these settings would have to be stored in a separate table (defined in hook_schema()).
Unfortunately, I don't know Features module enough to provide alternative solutions, but maybe by implementing the appropriate hooks, these predefined settings could be also exported.

But you can also set the status of this issue to "closed (won't fix)", because by implementing hooks, a similar behaviour can be achieved! Anyway, thanks for thinking about the feasibility of the request!

alan d.’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Status: Active » Closed (works as designed)

Personally I think that there is too much overhead implementing this. Reopen if anyone wants to argue the point :)

alan d.’s picture

Issue summary: View changes

adding imgur links for the illustration (because of attached images error message: "Ignored: Check issue status")