Help

5

reduce text area of text type field

Avatar
Nehal

Hi,

How to reduce text area of the text field. I have tried and text area reduced but values are not saved in that. Can anyone help ?

1 Comment
Avatar
Discard

Hello You get any solution ?

2 Answers
0
Avatar
Nikunj Ladava (nla)
Best Answer

Hello Nehal,

i have solution for your problem i think it will help you.

First you have to create any  field of Text in your py file

comment = fields.Text(string="Comment")


and while using this field in your xml file you need to give width  for it.

i.e  

<field name="comment" style=' max-width: 1150px;  width: 500px'/>

so max width for your textarea is 1150 pixel and minimum width is 500 pixel



Avatar
Discard
0
Avatar
Rajkumar
Best Answer

Hi,

Below code is useful to reduce text area

<fields name="notes" class="notes_width"/>

In your static/src/css/file.css

Add

.notes_width{
    height:100% !important;
    margin-left:10px !important;
    margin-top:10px !important;
}

1 Comment
Avatar
Discard
Avatar
Nehal
-

Not worked for me. Have you checked?