Skip to Content
मेन्यू
This question has been flagged
2 Replies
3519 Views

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
Discard
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
Discard
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
Discard
Related Posts Replies Views Activity
1
अग॰ 23
2885
1
मई 23
2659
3
अप्रैल 23
4669
1
जन॰ 23
2676
2
अग॰ 24
4201