Show fields based on specific option in a drop list

in payment type i have four options cash,cheque,benefit and online transfer … i want show specific field only if i choose cheque (cheque reference , cheque data …)

any help?

You can use display depends on to do it:

Go to the field that is supposed to be shown if the value = Cheque and add
eval: doc.payment_type == “Cheque”

i make same as this code , but it shows error

make sure it is spelled exactly like the value in the other field. Different spelling (Cheque instead of cheque) may cause this error. Or try eval: doc.payment_type == ‘cheque’.

1 Like