EditorGUILayout.TextField - How to have user type in field and have it stay?

Ok, so I’ve been on this for hours and I simply don’t get it.
I’m building a simple custom editor and I want to display a text field where the user can simply just type something and it stays until I press a button (“save” for example).

Currently the examples don’t show how to do this.
How would I write this?
If I do: EditorGUILayout.TextField("Label: ", “”); then type in the field, if I click another field it would revert to “”.

Also, my sliders… don’t slide using: EditorGUILayout.IntSlider(15,1, 100);
Any help will be greatly appreciated.

Why are you using EditorGUILayout?

Simply just use GUI.TextField:

formTitle = GUI.TextField (Rect(x, y, width, height), formTitle);

where formTItle is a string of course

Finally figured it out. It seems you can’t initialize and call on the same line. X|.