Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
3511 Tampilan

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
Buang
Jawaban Terbai

 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
Buang
Jawaban Terbai

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
Buang
Post Terkait Replies Tampilan Aktivitas
1
Agu 23
2877
1
Mei 23
2657
3
Apr 23
4662
1
Jan 23
2669
2
Agu 24
4195