Should look at the forge first.
CaptainComic's "GUI Widgets" pack will do what you want, I think.
I can't give you a 'simple' answer as to how to put the text into an attribute. When dealing with code pages or blocks - things get real complicated to explain.
Basically the quick and dirty you'd want to put that inputField into a class with a static public TextField variable, and then create a Keyboard Event in another behaviour with the following block;
- [Set attribute to [CODE: (classname).inputField.text]]
if you don't know how to make a class, or what 'static public variable' means then you're not ready to use code pages

. You can do most of what you want with blocks alone, even for complex games.