【发布时间】:2016-02-26 02:50:50
【问题描述】:
我有这个奇怪的问题,我真的不知道为什么会这样。 文本区域加倍,它们的位置不好。 看图。
所以,构建器看起来像:
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('imie', 'text', array('label' => false, 'translation_domain' => 'FOSUserBundle'))
->add('nazwisko', 'text', array('label' => false, 'translation_domain' => 'FOSUserBundle'))
->add('username', null, array('label' => false, 'translation_domain' => 'FOSUserBundle'))
->add('email', 'email', array('label' => false, 'translation_domain' => 'FOSUserBundle'))
->add('telefon', 'number', array('label' => false, 'translation_domain' => 'FOSUserBundle'))
->add('plainPassword', 'repeated', array(
'type' => 'password',
'options' => array('translation_domain' => 'FOSUserBundle'),
'first_options' => array('label' => false),
'second_options' => array('label' => false),
'invalid_message' => 'fos_user.password.mismatch',
))
->add('captcha', 'captcha', array(
'label' => ' ',
'width' => 200,
'height' => 50,
'length' => 6,
'invalid_message' => 'The captcha code is invalid.'
))
;
}
和 html.twig
请注意,我将 symfony 与 twig 一起使用了 2 周,而且我是初学者。我也是 FOSU 的新手。我只想将注册表单的默认外观从 FOSU 更改为适合我的站点。
【问题讨论】:
标签: forms symfony twig textarea fosuserbundle