I'm with symfony3, when I generate an example form type form, how can you specify the space from label
to another? , since I have very focused, and I just want to put a <br>
to Image (file selection).
Does it have to be from the Type form or since it is twig?
I mean, I do not know how to specify a <br>
TYPE code :
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder
->add('title', TextType::class, array('label' => 'Titulo :', "required" => true,
"attr" => array("class" => 'form-title form-control')))
->add('content', TextareaType::class,
array('label' => 'Contenido :', "required" => true,
"attr" => array("class" => 'form-contenido form-control')))
->add('status', ChoiceType::class, array(
'label' => 'Estado :',
"required" => true,
"choices"=>array(
"Publicado" => "public",
"Privado" =>"private" ),
"attr" => array("class" => 'form-title form-control' )))
->add('image', FileType::class, array('label' => 'Imagen:', 'multiple' => true,
"attr" => array("class" => 'btn btn-primary btn-green' )
))
->add('category', EntityType::class, array(
'class'=>'BlogBundle:Category' ,
'label' => 'Categorias :', "required" => true,
"attr" => array("class" => 'form-title form-control')))
->add('tags', TextType::class, array('label' => 'Etiquetas :',
"mapped"=>false,
"required" => true,
"attr" => array("class" => 'form-title form-control')))
->add('Guardar', SubmitType::class, array('label' => '',
"attr" => array("class" => 'form-submit btn btn-success col-md-offset-6 col-md-3')));
}
twig code :
{% extends "BlogBundle:Default:layout.html.twig" %}
{% block content %}
<div class="col-lg-6">
<h2> Añadir Etiquetas </h2>
{{form_start(form ,{'action':'' , 'method':'POST'}) }}
{{form_end(form)}}
</div>
<div class="clearfix"> </div>
<br>
{% endblock %}
THANKS