Can you track the value users enter in an input field?

If there is a UI that requires the user to enter an amount, can Matomo track the values entered by users? Is this done by putting an event tracker on the input box? Or by User ID tracking?

Thank you!