Код: Выделить всё
class CustomForm extends FormBase
{
// ...
$customfield = new Numeric('customfield');
$customfield->setLabel(ucwords($translations['keyi18n']) . ' [i][/i]');
$this->add($customfield);
// ...
}
< /code>
В нашем шаблоне Volt мы отображаем форму следующим образом: < /p>
{{ form.label('customfield', ['class':'customclass']) }}
{{ form.render('customfield', ['class':'customclass']) }}
keyi18n <span title="Lorem" class="gv-tip"> <i class=" fas fa-info-circle"></i></span>
< /code>
Вещи, которые мы пробовали: < /p>
- Включение /отключение режима Volt AutoScape < /li>
Использование Tag :: setAutoScape (false); В Volt View
Подробнее здесь: https://stackoverflow.com/questions/794 ... orm-labels
Мобильная версия