[ADD] survey_dropdown_simple_choice
Display "Multiple choice: only one answer" (simple_choice) survey questions as a dropdown list instead of radio buttons, per question. The native radios are kept (hidden by CSS) and still carry the answer: the dropdown only clicks them, so validation, conditional questions, "Other" comment, auto-submit and AJAX submit are handled natively. In review / print mode, only the selected and correct answers are displayed. Native rendering is kept when suggested answers contain images. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<odoo>
|
||||
<record id="survey_question_form_dropdown" model="ir.ui.view">
|
||||
<field name="name">survey.question.form.dropdown</field>
|
||||
<field name="model">survey.question</field>
|
||||
<field name="inherit_id" ref="survey.survey_question_form"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='comments_allowed']" position="before">
|
||||
<field name="display_dropdown" invisible="question_type != 'simple_choice'"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
</odoo>
|
||||
Reference in New Issue
Block a user