How do you set a input field via code?

I have an input field that i want to have set with a default value that is set by code. Is there a way to do this?

I guess I’m pretty dumb because i didn’t try setting the text variable. That ends up working. For some reason i thought that was going to set the placeholder text.