Problems with automatic filling form

I’m using a code to automatically fill in the “imput1” entry for a form with the user’s name when logged in. It seems to work correctly, except for one thing: Even with the user’s name appearing in the entry field, when submitting the form the field appears blank in the database, as if it had not been filled out. All other entry fields that are filled in manually appear in the database. Does anybody know how to solve this?