How to add logged in member to a form field.

I am not a developer but using the Dev Mode to add code to a page. I used the script from a previous forum post about adding a logged in members info to a form field. I added that script and when I access the form, the user id shows up—success!----but then goes away after a couple of seconds. How do i make the info stay on my form?
Thank you