Reforml
GitHub

Show If

Reforml provides way to decide whether to show a field depending on value of other field

Depend on boolean field

You can directly supply a field name of boolean field. If that boolean field is true, this field will show.

Live Demo
value:
{}

Depend on any field

You can directly supply a field name to comparison map to determine whether this field should show. You may use . to denote value inside a nest field, for example if form value is {foo: {bar: 1}} you can use {'foo.bar': {$eq: 1}. Here are the list of supported operators:

keydescription
$eqequal
$neqnot equal
$gtgreater than
$gtegreater than or equal
$lteless than or equal
$ltless than
$inis member of array
Live Demo
value:
{}
Previous:
Validation