mardi 27 novembre 2018

Laravel Nova conditional fields on form

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

For example: if "is trial" is selected we must specify a value for "trial end date", but there's no point showing the "end 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 to reflect such conditional relationships?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire