Originally Posted by Antiklesys
I'm trying to do a "Submit" form.
|
In your case it might be easier to just use a StaticPopupDialog, you can reference
StaticPopup.lua for more detailed examples
Lua Code:
local someVar
-- /run StaticPopup_Show("TestPopup")
StaticPopupDialogs.TestPopup = {
text = "Some text",
button1 = OKAY,
OnAccept = function(self)
someVar = self.editBox:GetText()
print(someVar)
end,
hasEditBox = 1,
}
There is also the
AceConfig input option if you want more full fledged options
Originally Posted by Antiklesys
I'm struggling with this as I don't seem to understand how the "Okay" button has been generated in the first place as it doesn't seem to be part of the code?
|
The "Okay" button there is part of the
DialogBox frame template
Here is an ugly example using the global variables because apparently I didn't bother
making them accessible as keys at that time
Lua Code:
local someVar
KethoEditBoxButton:HookScript("OnClick", function(self)
someVar = KethoEditBoxEditBox:GetText()
print(someVar)
end)