How to get a username logged in a textbox?

My demand is simple because I do not understand programming.
I have a form on a member page with the entries (name | date of entry | date of exit). I would like the input name to be filled automatically with the name of who is logged in and two other entries to be made manually.

1 Like

I also need this for a Reviews input form. Thanks for any insight.

Unfortunately this can not be done without databases a lot of code (At this time) . Currently you can only access the user ID, their Email, and their roles.
if the email works for your needs that can be achieved with the following

//Page Code
import wixUsers from 'wix-users';
$w.onReady(function () {
  wixUsers.currentUser.getEmail() .then( (email) => {  $w('#ID_of_the_text_box).text = email } );  
});

For achieving this with usernames I am currently using a system where users set a screen name and other info when they first create their account and it saves that to a database that can then be called from with a query. This however requires extensive code.