Just checked ingame:
If the "report player" screen is shown the variable SCENE_MANAGER.currentScene.name = "helpCustomerSupport".
Scene = HELP_CUSTOMER_SUPPORT_SCENE
One fragment of this scene (SCENE_MANAGER.currentScene.fragments) is (within keyboard mode! Did not check the gamepad mode!)
HELP_CUSTOMER_SERVICE_ASK_FOR_HELP_KEYBOARD_FRAGMENT
So you could try to check if this fragment is only active as the "report player" interaction was executed (or maybe too if the /bug report is started).
You could use the callback funciton on "fragment_shown" state, as shown in the thread that I've linked above, to check for the edit controls are not hidden.
The edit control names are
Player name to report (CT_LABEL)
ZO_Help_Ask_For_Help_Keyboard_ControlDetailsTextLineFieldText
Description text (CT_LABEL)
ZO_Help_Ask_For_Help_Keyboard_ControlDescriptionBodyFieldText
You are able to change the text in the description field by using something like this:
ZO_Help_Ask_For_Help_Keyboard_ControlDescriptionBodyFieldText:SetText("Hello world")
This worked for me.
Example code:
Lua Code:
HELP_CUSTOMER_SERVICE_ASK_FOR_HELP_KEYBOARD_FRAGMENT:RegisterCallback("StateChange", function(oldState, newState)
-[[ possible states are:
SCENE_FRAGMENT_SHOWN = "shown"
SCENE_FRAGMENT_HIDDEN = "hidden"
SCENE_FRAGMENT_SHOWING = "showing"
SCENE_FRAGMENT_HIDING = "hiding"
]]--
if newState == SCENE_FRAGMENT_SHOWN then
local descCtrl = WINDOW_MANAGER:GetControlByName("ZO_Help_Ask_For_Help_Keyboard_ControlDetailsTextLineFieldText", "")
if descCtrl ~= nil then
descCtrl:SetText("Hello World")
end
end
end) -- function
If this doesn't work maybe try to add a small delay via function zo_callLater(function(), delayInMilliseconds) for testing purposes before the control get's assigned to descCtrl. Sometimes the controls are not always "there" already if a sene or fragment is shown.