تخطي للذهاب إلى المحتوى
القائمة
لقد تم الإبلاغ عن هذا السؤال
1 الرد
13095 أدوات العرض

Dears,

I want to use a bigger size for Text input fields used on survey templates.

On the survey module, especially on the views folder, there is the survey_templates.xml file, I found the template responsible of generating text input fields :

<template id="textbox" name="Text box">
     <input type="text" class="form-control" t-att-name="prefix"/>
</template>

I didn't find the class "form-control" to try modify something there, could you tell me where can I find it ?

I also want to try to add the style attribute: style="size:40px;", so the text input will be like :

<input type="text" style="size:40px;" class="form-control" t-att-name="prefix"/>

All your suggestions will be welcome.

 

الصورة الرمزية
إهمال
أفضل إجابة

You could use this

<input type="text"class="form-control" t-att-name="prefix" widget="text"/>

or this:

<h1>
<input type="text" class="form-control" t-att-name="prefix"/>
</h1>
الصورة الرمزية
إهمال
الكاتب

Hey Axel, Sorry I did'nt express myself well, it's not for the text font, it's for the Text input layout, I want to make it wider. (so when the user prints the survey he gets all the informations he entered)

الكاتب

I've tested with : style="width:40px;" with no changes noticed. I hope you get what I intend to do, it's simple, I want the input zone to be wider.

That are two different things. the survey form and the report template, if you wanna get it bigger in the form you could wrap the field inside an h1 or add the widget text to use a textarea. in the report template you could use a paragraph to show the value of the field

see my updated answer with this

الكاتب

It worked with : font-size, it automatically increased the width, with the font size, is there a way to increase the width only ? Thanks.

test the others solutions

الكاتب

I've tested the two suggestions, nothing changed on the survey form. Indeed, there is the survey form, and report template, but both uses the same template, the difference is that the survey form displays a wizard (page by page), and the printable view (report template) displays all the pages at the same time, both uses the same template. How can I use the paragraphe in this case ? would the

tag take effect only when I print the survey ?

المنشورات ذات الصلة الردود أدوات العرض النشاط
2
نوفمبر 21
8132
0
أغسطس 24
1089
0
يوليو 25
3151
1
أغسطس 24
1270
0
سبتمبر 20
8706