markdomansky / WebJEA

WebJEA - Secure Self Service Web Forms from PowerShell Scripts
GNU General Public License v3.0
236 stars 27 forks source link

Get current web username for current form #53

Closed thlayli123 closed 3 years ago

thlayli123 commented 3 years ago

Is there a way to pass the username of the current web user to one of the parameters? I have my form set to a specific group of users, and it would be great to autofill their usernames into the form.

markdomansky commented 3 years ago

If you add a parameter of $webjeausername, it will automatically pass the requester's username to the script. It is not possible to pre-populate a field that then be changed by the user to a different username. The closest to that would be to have 2 fields, $webjeausername and $username (or similar), and make $username not mandatory. Then do a check to use webjeausername if $username is blank.

thlayli123 commented 3 years ago

This is perfect, for what I need. Thanks!