Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
3 ตอบกลับ
29566 มุมมอง

My problem is I can't change the width of the label in form view. I can give the group a colspan of 4 but the label just takes the aprox 100px space and then the input field takes up everything else. The only way I managed  to stretch the label is by adding a long string to the group tag.

<group col="4" string="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed d."> 

    <field name="field_with_long_label"/>

</group>

อวตาร
ละทิ้ง
ผู้เขียน

Thanks Hilar! Your way worked... using style in xml doesn't work but with the class it works. Sorry can't convert your comment to the answer, got to little karma.

คำตอบที่ดีที่สุด

Hello Samo,.

You can try style for it. You can size it as per your requirement.
For example:
<field name="field_with_long_label" style="width:50%%" />
Hope it helps!

Regards,

Mayank Gosai

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

you can add a class to the field and give proper style with css and add it to the assets backend.

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

define style tag inside form and override bootstrap classes


    label.o_form_label {

    width:16rem

    }











อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
ธ.ค. 21
5167
3
เม.ย. 18
6035
2
ก.พ. 18
3209
1
ก.ค. 17
4079
0
ก.ค. 17
3541