Because the field label is required, the best you can do to not show the label is put a space in the label field.
A check box that lets you remove the label from the front end render (leaving it showing in the fields tab in the article editor).
If you put a space in the label field, the label still renders the space and the : mark after it, making the output look really odd.
I'm using the JUX dev install, PHP 7.1.0, MySQL 5.6.28-76.1-log
The goal here is to make custom fields as flexible as possible before resorting to overrides and custom css. To give users more out of the box functionality.
Okay, I figured this out tonight and added it to my build. Tomorrow I'll sort out a pull request. There's a change to the DB so I have to figure out how that works.
Before you do a PR. Did you try creating a user.css with the following rule
.hidelabel .field-label {
display:none;
}
and then add hidelabel
as the renderclass into the field?
@brianpeat if you put the hide label option into params, then you don't need to change the table layout.
@Bakual I don't want the user to have to put in a class to hide the label. That's like the worst user experience ever. :)
I don't want the user to have to put in a class to hide the label. That's like the worst user experience ever. :)
Imho, Joomla suffers from to many parameters where the same thing could be achieved with a CSS class and some simple CSS rules.
I love css, but I'd much rather have one more switch in there than have to remember to use a class. It also means users with no css experience will have to google how to hide the label. To me that's a bad experience.
One option would be what we did for the "Caption Class" in the editor image plugin. There we suggest some classes which are supported by most templates using a datalist. Of course then the CSS rules would have to be in our templates to work.
Closing as we have a PR
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-01-25 15:08:34 |
Closed_By | ⇒ | Bakual |
Here's a screen shot of putting a space in the label for a Text-area type field:![screen shot 2017-01-23 at 14 39 56](https://camo.githubusercontent.com/81f826c79d35bcf0d6de31bd4832c0632032ed8f/68747470733a2f2f6973737565732e6a6f6f6d6c612e6f72672f75706c6f6164732f312f38623937323863353237623738393062373362333366376533363238636361392e706e67)
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/13707.