Retrieve values from textfields and form elements in the dialog using this.dialog.document.forms[0].fileName.value.
Examine this page in VJS to learn more.
Below is an example dialog.
This is an example of a highly customized dialog: