Custom Script for hiding and showing input fields

I added a custom field in item doc as item division with option cosmetics and consumable.
and also another field as item usage.
I need to display item usage only when I select cosmetics in the item division.

Anyone please help me to write custom script for this.

You can use “Depends on” property to hide/unhide a field based on another.

Please can u help me with an example. I am not able to understand where to write the dependency rule

eval:doc.enquiry_from==="Customer"
OR
eval:doc.myfield=='My Value'
OR
eval:doc.age>18

Write this scripe

Open Customize Form, Select your form in Enter Form Type.
In field list, open your filed and write above script.

2 Likes