#Is it possible to set the value of a field based on a selection in another field?
6 messages · Page 1 of 1 (latest)
6 messages · Page 1 of 1 (latest)
Title says it all really.
I have a custom field that fetches data from a 3rd party API and renders a select component.
When the editor selects an option from this dropdown I want to fill in some other fields on the content item if they are don't already have a value.
Absolutely
You can do this inside your custom field component, with the hooks we expose: https://payloadcms.com/docs/admin/hooks
check out useFormFields, it should do what you need 👍