Добрый день, у меня есть вопрос по поводу Форм в Симфони.
Создал Форму:
File: register_content.html.twig
{% trans_default_domain 'FOSUserBundle' %}
{{ form_start(form, {'method': 'post', 'action': path('fos_user_registration_register'), 'attr': {'class': 'fos_user_registration_register'}}) }}
{{ form_widget(form, {'attr': {'class': 'form-row'}}) }}
<div>
<input type="submit" value="{{ 'registration.submit'|trans }}" class="btn btn-primary btn-block" />
</div>
{{ form_end(form) }}
File: twig.yaml:
form_themes: ['bootstrap_4_layout.html.twig']
File: RegistrationFormType.php
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('sex', ChoiceType::class, array(
'label_attr' => array(
'class' => 'radio-inline'
),
'choices' => array(
'form.Mrs' => 'Mrs',
'form.Mr' => 'Mr',
),
'multiple' => false, 'expanded' => true,
'translation_domain' => 'FOSUserBundle',
'label' => 'form.sex'
))
->add('firstName', TextType::class, array(
'label' => 'form.firstName',
'translation_domain' => 'FOSUserBundle'))
->add('lastName', TextType::class, array(
'label' => 'form.lastName',
'translation_domain' => 'FOSUserBundle'));
}
<form name="fos_user_registration_form" method="post" action="/register/" class="fos_user_registration_register">
<div id="fos_user_registration_form" class="row">
<div class="form-group"><label for="fos_user_registration_form_email" class="form-control-label required">E-Mail-Adresse</label><input type="email" id="fos_user_registration_form_email" name="fos_user_registration_form[email]" required="required" class="form-control" /></div>
итд.......
как нибудь можно дабавить сетку? чтобы получилось чтото вроде этого:
<div class="form-group col-sm-6">
?
Заранее благодарен