Symfony3 Form how to specify a br (spacing)

1

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

    
asked by Gus Ch 29.08.2018 в 16:33
source

1 answer

0
 {% block  content %}        
    <style type="text/css">
.gusEspacio{
         padding: 70px;
    border: 1px solid #4CAF50;
    }

    label[for=blogbundle_entry_image]{

            margin-top: 15px;
            margin-bottom: 15px;
             padding: 8px;
             border: 1px solid #39CC3F;

    }
    </style>
        <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 %}

TYPE:

     ->add('image', FileType::class, array('label' => 'Imagen:', 'multiple' => true,
"attr"  => array("class" => 'btn btn-primary btn-green 
gusEspacio' ) ))

    
answered by 29.08.2018 в 17:05