Simplify your stack and build anything. Or everything.
Build tomorrow’s web with a modern solution you truly own.
Code-based nature means you can build on top of it to power anything.
It’s time to take back your content infrastructure.

Update Field from another Field

default discord avatar
zgeorge225 months ago
1

I have a RawJSON field that is editable. And I have another ParsedJSON field that is readonly and should attempt to get a subset of the RawJSON.



I am trying to get the ParsedJSON field to update live (similar to how the slug field in the website template updates live based on the title). I'm wondering if there is a proper/simple way to do this without creating a whole custom component.



I've tried using the beforeValidate hook on the ParsedJSON field which does update the value in the database, but doesn't reflect the change in realtime in the admin panel unless I refresh the page :/ I've been searching the discord/docs (and seen various uses of Field hooks, dispatchFields, etc) but am struggling to pull together the best solution

Star on GitHub

Star

Chat on Discord

Discord

online

Can't find what you're looking for?

Get dedicated engineering support directly from the Payload team.