Skip to Content
Menu
This question has been flagged
1 Reply
11938 Views

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.

 

Avatar
Discard
Best Answer

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>
Avatar
Discard
Author

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)

Author

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

Author

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

Author

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 ?

Related Posts Replies Views Activity
2
Nov 21
6554
0
Aug 24
204
0
Jun 21
2295
1
Aug 24
249
0
Sep 20
7712