I know that may not help you in this example. I'll keep looking for the other way I did it. If your using Javascript to create your form you can get the username using the following line of code .
this._appCtxt.get(ZmSetting.USERNAME);
I have not tested the ones below, but they should work. I'm getting them from the Ajax_all.
js file and searching for ZmSetting and seeing what I can access.
this._appCtxt.get(ZmSetting.USERID);
Some other things you can get this way are
this._appCtxt.get(ZmSetting.CLIENT_DATETIME)
this._appCtxt.get(ZmSetting.CLIENT_RELEASE);
this._appCtxt.get(ZmSetting.CLIENT_VERSION);