Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

jaycito's avatar

Laravel Nova conditional fields on form

I'm creating a form for one of my resources using Nova. Some of the fields have conditional relationships to one another.

For example if "is trial" is chosen we must specify a value for "trial end date", but there's no point showing the date field on the page if "is trial" isn't picked. Another example, fields A and B are mutually exclusive.

All of these can easily be enforced with conditional validators in the backend, and I know how to do that. I'm just trying to make an interface that's not confusing.

How can I customize the frontend JS forms for this resource?

0 likes
3 replies
Minahgo's avatar

I don't think there is any support for this at this point. You will either have to create your own resource tool or just add a help text to your fields that explains what's going on and do the validation in the backend as you said.

Text::make('Trial Date')->help('Only required if is trial is selected')
1 like

Please or to participate in this conversation.