Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
1 ตอบกลับ
6544 มุมมอง

hey,

I would like add a dropdown in my contact form on my web site. but i d'ont know how I should do. 

And how must i do for the dropdown have an impact on my backoffice. for exemple: if i add a dropdown with type of questions. It's could be great if the types of questions sont rangé par type. 

Thanks to help me :) 

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

You can create a new dropdownlist with your own values like that:

 

VIEW:

 <option value="">Select country...</option>
       <t t-foreach="countries or []" t-as="country">
       <option t-att-value="country.id" t-att-selected="country.id == account.country_id.id"><t t-esc="country.name"/></option>                          
       </t>

 

CONTROLLER:

 

countries = http.request.env['res.country']

values = {
                'countries': countries.search([]),
         }
         return http.request.render('eq_website_customerportal.accountDetail', values)

 

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ย. 17
4488
1
ส.ค. 17
5525
0
มี.ค. 15
3458
2
ก.ค. 25
892
1
ก.ย. 24
1486