Can backend form fields triggers required field visibility?

With Tailor, I’m defining a blueprint for an entity. using the ‘trigger’ property for a form field, I would like it to be either (visible AND required) or (hidden AND not required) depending on another field value. Is it currently possible? Here is what I’ve tried (suppose described entities can have an area associated, there’s a checkbox to tell if there’s an area, that should show/enable concerned field):

        label: Area
        type: entries
        source: Members\Area
        validation: "required"
        maxItems: 1
        disabled: true
            action: enable|show
            field: hasArea
            condition: true


Hi @hms

I think you may want the required_if rule. Give it a try:

validation: "required_if:hasArea,true"

Hi, thanks for your answer, it works perfectly. Sorry I didn’t search long enough!

1 Like