コンテンツへスキップ
メニュー
この質問にフラグが付けられました
3 返信
29097 ビュー

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

    }











アバター
破棄
関連投稿 返信 ビュー 活動
1
12月 21
4768
3
4月 18
5767
2
2月 18
2987
1
7月 17
3818
0
7月 17
3318