Adding numbers to an input field

Hello Guys i have a question about Unity Buttons and mentions
I am currently creating an Keypad(you have to input code into a keypad to unlock a door)
but i can’t seem to define an inputifield or text in which i can add the input numbers to. so my question is:
How do i reference a text or inpufield into an script so i can change its value from a script?

Same idea as I posted here: Converting int to long - #2 by spiney199

Have a middle-man component. This has the value of the keypad button. Your button’s UnityEvent points to said component, invokes the method, and said component passes on the message with the appropriate value.