The following onClick event handler for the login button on a custom login form adds the password typed into the password1 component, a custom entryfield that obscures text as it is typed, and runs the main form:

function loginButton_onClick( )

   form.rowset.parent.session.addPassword( form.password1.value ) 

   do MAIN.WFM