I have a select field which shows different relationship fields depending on the selection with a condition. I am running into an issue here where the hidden fields keep their data.
Is there a way to set the hidden fields to default so that only the active fields has a value?
You could probably use beforeValidate hooks for this.
Ah interesting, thanks!
Used the beforeChange hook in the and. Works perfectly.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.