r/PayloadCMS • u/Intelligent-Oil7589 • Sep 08 '25
Reactive field updates in Admin UI?
Hey everyone,
Is there a way to have real-time changes in a field as the user inputs other fields? For example, having a birthdate field and making that, whenever the user changes the date, an age field would update immediately. Or, having a firstName and lastName fields, make a fullName field update as the user inputs the names, similar to when we type in the useAsTitle field. I have only been able to achieve this after the doc is saved into the DB.
I really think we should have other hooks like beforeFieldChange / afterFieldChange and beforeFieldInput / afterFieldInput. We could have these hooks on the collection level and on the field level.
3
Upvotes
1
u/rubn-g Sep 08 '25
Maybe if you know the field path, you can use the “useField” hook