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

Hi All


working on a project and a little stuck.


we have fields created that should only show when the contact card is set as company.


when contact card is set as individual we would like to hide these fields.


Is there an option to wrap all of the fields together or will we need to hide each individual field?


any assistance would be greatly appreciated.


""Cheers

G

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

Hi  Gerardo Altman,

Try,

<field name = "contact_card"/>
<
field name = "your_field_name" attrs = "{'invisible': [('contact_card', '=', 'individual')]}"/>


Hope it helps,
Kiran K

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

Thanks for your help.

you put me onto the right track.

took a deeper look into the existing code for the contact card and discovered the below.

replace form_id with the ID from the form module you wish to hide.

I've worked it out for individual fields.
















what would be great is to see if there was a way to do the same for a group instead of individual fields.


any ideas?


""Cheers

G

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 5 25
1463
1
thg 3 25
1599
MERGING CONTACTS Đã xử lý
1
thg 2 25
3459
Use of external id Đã xử lý
2
thg 2 25
2945
2
thg 2 25
2299