suffix and requiredsuffix appears even if label is set to null

3 years ago

Member | 56

If I set label to null, the default form renderer adds the ‘suffix’ and the ‘requiredsuffix’ (the latter only if the field is set to required).

$renderer->wrappers['label']['suffix'] = ':';
$renderer->wrappers['label']['requiredsuffix'] = '*';
$form->addText('name', null, 30)
    ->setRequired('Required field');

Imho the renderer shouldn't add ‘:’ and ‘*’ if there is no label. Or is there something I can prevent this when creating the form control?