Best way to fill hint action data from component it is hinting from

Sorry if that doesn't really make sense but in the below code, I have a text box and a hint action on there,
I need to be able to get the value of the text box to populate the options of the radio field in the action slideover, i have tried before form filled where i can get the value of connection but returning $data['directories'] as an array so ['test'=>'test'] does not fill this, when i do the options i need to be able to get this from the connection information.

https://gist.github.com/sabuto/6d4ec88e7f1315ea1a12865357dc59b2
Gist
Test.php. GitHub Gist: instantly share code, notes, and snippets.
Was this page helpful?