Disable GUI.Textfield after a GUI button is pressed?

Hello there,
I was wondering if it is possible to disable the textfield just like you disable the GUI.button?
Any help would do me a huge favour!

var isVisible = true; 
function OnGUI() { 
 if(isVisible ){
 bestPlayer = GUI.TextField (Rect (600,120,200,50),bestPlayer, 25);
 isVisible = false;
}
 PlayerPrefs.SetString("PlayerName",bestPlayer);  
}

I tried the above code but this doesn’t even make the textfield appear.

var isVisible = true;
function OnGUI() {
if(isVisible ){
bestPlayer = GUI.TextField (Rect (600,120,200,50),bestPlayer, 25);
PlayerPrefs.SetString(“PlayerName”,bestPlayer);
if (Event.current.keyCode == KeyCode.Return) {
isVisible =false;
}
}

This should disable the gui.textarea once you click “enter” button