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

i have a password field ,and with a boolean field i'd like to show and hide the password, how to make it possible?


thanks in advance

อวตาร
ละทิ้ง
ผู้เขียน

Hello Artem ,

Thank you for the advice.

But what i ment by this is normally the password field shows characters as stars (*********) but when i check on a boolean field i need the field to show the real charector like "abcd123" ,

คำตอบที่ดีที่สุด

<field name="mypassword" attrs="{'invisible': myboolfield"/>

Does it work?

อวตาร
ละทิ้ง
ผู้เขียน

Hello Artem ,

Thank you for the advice.

But what i ment by this is normally the password field shows characters as stars (*********) but when i check on a boolean field i need the field to show the real charector like "abcd123" ,

ผู้เขียน

Thank you Artem ,

The link you gave me solve my problem

คำตอบที่ดีที่สุด

Hi Sreeraj,

Try this..

<field name="show_password"/>      

<field name="password" password="False" attrs="{'invisible': [('show_password', '=', False)]}"/>                               

<field name="password"  password="True" attrs="{'invisible': [('show_password', '=', True)]}"/>

อวตาร
ละทิ้ง