Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
13122 Widoki

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.

 

Awatar
Odrzuć
Najlepsza odpowiedź

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>
Awatar
Odrzuć
Autor

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)

Autor

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

Autor

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

Autor

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 ?

Powiązane posty Odpowiedzi Widoki Czynność
2
lis 21
8193
0
sie 24
1116
0
lip 25
3178
1
sie 24
1326
0
wrz 20
8734