I'll try again to explain more clearly:

I have a function, that extracts values through an API.

Somewhere in that function I have to get login variables (password, user, domain, project and URL)

I first had an inputbox, but as there the password is not masked, I'd like to have some kind of form.

I can show the form within my extract function, but cannot seem to close it and pass variables when enter is pressed, and exit my extract function when cancel is pressed.