Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
3 Trả lời
29551 Lượt xem

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>

Ảnh đại diện
Huỷ bỏ
Tác giả

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.

Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

define style tag inside form and override bootstrap classes


    label.o_form_label {

    width:16rem

    }











Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 12 21
5150
3
thg 4 18
6013
2
thg 2 18
3203
1
thg 7 17
4071
0
thg 7 17
3526