I'm not entirely sure what you need. But you can insert the remote user into every form with a simple jquery call:
$( document ).ready(function() {
$( "form" ).append( '<input type = "hidden" name="remote_user" id="remote_user" value = JSINFO['remote_user']>');
});
You can refine this further, i.e. attaching it to the html in your page:
Create an undefined hidden input:
<input type='hidden' name='remote_user'>
And use this code to set the value:
$( document ).ready(function() {
dom = document.getElementById('remote_user');
dom.value = JSINFO['remote_user'];
});
You can put the above code into your template's javascript (script.js) or into conf/userscript.js.
See:
https://www.dokuwiki.org/devel:plugin_programming_tips?s[]=userscript.js
You can set the JSINFO value as described here:
https://www.dokuwiki.org/devel:javascript?s[]=jsinfo#jsinfo
This page basically gives you the code that you need, but you will have to create a small action plugin. You will find what you need here:
https://www.dokuwiki.org/devel:action_plugins