-
Notifications
You must be signed in to change notification settings - Fork 578
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom blocks: Block title is being displayed twice #2485
Comments
If you have more than one field in a block, you do want a label on each field for clarity and accessibility purposes. In the case of blocks with a single field, I would agree with you and I believe you can do that by using an empty label (TBC in Twill 3 with the form builder, but I know for sure it was possible in Twill 2). However, the label on the block wrapper itself is something you can actually configure to use the content of one of the fields in the block itself, and you can decide to keep the prefix or not in that case. I know that's not exactly what you are talking about but I want to make sure you are aware of the full behavior. The default blocks are also not a great reference, see the discussion in #2410. |
I realised that yes it's the label of the field and not the block which could be different But it's not possible to set an empty label to a field, maybe we should allow it? public function getForm(): Form
{
return Form::make([
Wysiwyg::make()->name('text')->label('')->translatable()
]);
} All the fields have |
If I change + if ($this->{$property} === null) {
- if (! $this->{$property}) {
throw new \InvalidArgumentException(
"Missing required field property '$property' on " . $this::class
);
} Then it displays without a label and doesn't complain about it, but I don't know if the better solution would be to remove |
Right, that's what I was suspecting would be blocking it on Twill 3. I think we could totally remove it from mandatoryFields to allow this use case. |
The block title is being displayed both in the repeater header and in the block content
This is wasting precious screen space
The default blocks don't seem to have this, but when you create you own blocks they all have this, is there any way to remove it?
The text was updated successfully, but these errors were encountered: