Skip to Content
Menú
This question has been flagged
2 Respostes
3504 Vistes

Hello, how can I put 3 fields in a form, that are on a single line and that each field has the corresponding label?

For example, the first field has a width of 50% and the other two fields have a width of 25%, but that these widths also have their labels, that the labels align with their fields.

Thank you very much for your support.



Avatar
Descartar
Best Answer

 HI  Learning_Odoo

  • You want to put 3 Fields with their respective labels on single line ,odoo 16 then use below code :

         Put 3 fields in .py file

​field1=fields.Char(string='field1')

         field2=fields.Char(string='field12')

        field3=fields.Char(string='field13')


          .xml file

 

 I hope this is helpful to you.


 Thanks & Regards,

 Email: odoo@devintellecs.com

 Skype: devintelle

Avatar
Descartar
Best Answer

Hi,

You can make use of bootstrap classes to set up the form. Give the code as shown below.


<div class="row">
    <div class="col-6">
      <label>

      </label>

      <input>

</input>

    </div>

    <div class="col-3">

<label>

      </label>

      <input>

      </input>

</div>

    <div class="col-3">

<label>

      </label>

      <input>

      </input>

</div>

  </div>



Hope it helps

Avatar
Descartar
Related Posts Respostes Vistes Activitat
1
d’ag. 23
2864
1
de maig 23
2636
3
d’abr. 23
4638
1
de gen. 23
2652
2
d’ag. 24
4172