Quick question on how to do something

I want to make it so when the user enters text into the derma text entry, it changes the value of variable “team2” to the value of the entered text.

team1 = team1 or “Default Nation 1”
team2 = team2 or “Default Nation 2”
leader1 = leader1 or “Default Leader 1”
leader2 = leader2 or “Default Leader 2”

function nation1name()
local DermaPanel = vgui.Create( “DFrame” )
DermaPanel:SetPos( 250,250 )
DermaPanel:SetSize( 500, 50 )
DermaPanel:SetTitle( “Please enter a name for your nation” )
DermaPanel:ShowCloseButton( true )
DermaPanel:SetVisible( true )

local DermaText = vgui.Create( “DTextEntry”, DermaPanel )
DermaText:SetPos( 20,25 )
DermaText:SetTall( 20 )
DermaText:SetWide( 450 )
DermaText:SetEnterAllowed( true )
DermaText.OnEnter = function()
DermaPanel:SetVisible( true )
concommand.Add(“editteamname”, nation1name)

Once you have declared the variable ‘team2’ use this line of code:

team2 = DermaText:GetText()

I think its actually GetValue, not GetText