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

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

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

Hi  Gerardo Altman,

Try,

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


Hope it helps,
Kiran K

อวตาร
ละทิ้ง
ผู้เขียน คำตอบที่ดีที่สุด

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

อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
1
พ.ค. 25
1496
1
มี.ค. 25
1624
MERGING CONTACTS แก้ไขแล้ว
1
ก.พ. 25
3737
Use of external id แก้ไขแล้ว
2
ก.พ. 25
3031
2
ก.พ. 25
2334