Modified demo to include case where no input type is specified.
Added code to core function to set password and text fields.