Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
1 Trả lời
6582 Lượt xem

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 :) 

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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)

 

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 11 17
4509
1
thg 8 17
5547
0
thg 3 15
3494
2
thg 7 25
913
1
thg 9 24
1500