Possibility to omit/hide a field label #4298
Replies: 1 comment 1 reply
-
@piljac1 Dunno when this was introduced, but in Nova Warning Since this is not documented anywhere I would consider it internal meaning the package maintainers may change / remove that property at any time. Also as stated above there's no convenient way to configure it on a per field basis. You could work around that limitation by extending a given field and adding a fluent setter to it and use that one. For example: <?php
namespace App\Nova\Fields;
use Laravel\Nova\Fields\Text as NovaText;
class Text extends NovaText
{
public function withoutLabel()
{
$this->withLabel = false;
return $this;
}
} I have no clue, why they did not expose that property via a setter but I'm sure they have their reasons. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Idea
It would be great if you would be able to omit/hide a field label from forms and detail views.
Why?
For example, if you have a separate field panel that has a single BooleanGroup listing categories provided by an API, it would be nice to avoid output "Categories" labels twice (name of the panel + field label). The name of the panel is enough to understand what we're outputting (in the case of a single field). No need to repeat it on the field label.
Right now, it is possible to have an empty label, but in the case of a single field, it is just really weird looking.
Beta Was this translation helpful? Give feedback.
All reactions