I am facing a challenge, where the form fields should be refreshed after a relationship field is updated. The reason is that other fields are populated, using default values, based on the relationship field selection.
Is it possible to refresh the DOM in field level hooks or is there a better methods to ensure reactivity?
Hi @KasparTr - are you using hooks or conditional logic to populate the other fields? I'm thinking you could use an
afterChange
hook on the relationship field, and call your functions to populate the other fields within this hook.
Star
Discord
online
Get help straight from the Payload team with an Enterprise License.