In the Odoo website contact form, I would like to add an existing selection field. Whenever I'm adding those fields they appear as radio buttons. Instead of radio buttons, I need to see those selection fields in a drop-down list.
Asked
Active
Viewed 2,124 times
-1
-
have you tried to add `widget='selection'` into your field in xml file? β Artem Strogin Dec 13 '19 at 14:28
2 Answers
2
Answer only valid if you want to change in website contact us form I prefer to see your code to completely understand the problem and from what I understand what you need to do is use Html selection field in your contact us website view and map itβs value in the existing field at backend like in controllers make sure the keys must be same

Muhammad Yusuf
- 563
- 4
- 20
0
Add in your Form view:
<record id="model_view_form" model="ir.ui.view" >
<field name="name">My Model</field>
<field name="model">model.name.example</field>
<field name="arch" type="xml">
<form string="Model Form View">
<sheet>
<group>
<field name="field_name" widget="selection" string="Field Name" />
</group>
</sheet>
</form>
</field>
</record>
You can find more information reading the official documentation about views: https://www.odoo.com/documentation/13.0/reference/views.html

norbertoonline
- 351
- 1
- 12
-
can you please add complete a solution. my questions are where we can define a value select value? β Mr Coder Mar 25 '20 at 06:05
-
Edit your question and place the code to see what you are trying to do! β norbertoonline Apr 05 '20 at 03:37