When I add a help text to the title in the panel, it is placed in between the title input field and the ‘→ url’ text. The ‘→ url’ text makes the explanation rather confusing…
Is there a way to hide the ‘→ url’ text under the Title field in the panel? (The functionality to change the url would still be there by the ‘Change URL’ link on the left of the panel)
Every field that is named title
will use the title
field automatically.
So what you could do is to overwrite the title
field with your own one:
site/fields/title/title.php
<?php
class TitleField extends TextField {
public function __construct() {
$this->label = l::get('fields.title.label', 'Title');
$this->icon = 'font';
$this->required = true;
}
}
2 Likes
When I add this I get the following error: The field class is missing for: titlefield
(I am running the kirby beta)
Ahh I needed to add ‘<?php’ at the top of the file – sorry!
Ah, sure. Sorry about that, I have corrected it above.
On a side note:
When I change ‘Title’ to something else in $this->label = l::get('fields.title.label', 'Title');
, it doesn’t actually change the label. Is that code actually being used anywhere?
My bad – I had it defined in my blueprint.