Why is there no Depends On for fields in Web Forms

Why isn’t there no Depends On for fields in Web Forms. Is it planned for future releases, if no, will anyone direct me on how to do it myself?

Thanks

@israrwz, you can display fields conditionally based on “depends on”

Lets suppose, you have a select field, with “Option 1”, “Option 2”, “Option 3”

And 3 others fields “Value 1”, “Value 2”, “Value 3”

Do you only want that:

Value 1 should be displayed when Option 1,
Value 2 should be displayed when Option 1 or Option 2 and
Value 3 should be displayed when diferent of Option 2 or Option 3

So you can add the below conditions in each fields, to archive this:

In Value 1

eval:doc.option == "Option 1"

In Value 2

eval:in_list(["Option 1", "Option 2", doc.option)

In Value 3

eval:!in_list(["Option 2", "Option 3", doc.option)

Where doc.option is your select field.

Thank you @max_morais_dmm but this only works only in the Customize Form and when creating or editing a DocType.

But when you are creating forms for the web frontend in Website module’s Web Form section there is no option to set the Depends On for a field.

@israrwz I’m sorry, I dont understood the context!
I believe that it is not used in Web Forms and never will :worried:

any idea on how will i be able implement such a feature myself.

@israrwz it’s hard to do, due many required parts of the standard forms is not supported by Web Forms