Search code examples
jquerypnotify

Password input for PNotify prompt


I want to use a PNotify prompt dialog for entering a password. Does anyone know how to change the input type to be password? I can't see any mention of it in the docs. http://jsfiddle.net/gusLfnux/1/

new PNotify({
  title: 'Password Required',
  text: 'Enter Password',
  icon: 'glyphicon glyphicon-lock',
  styling: 'bootstrap3',
  hide: false,
  addclass: 'stack-modal',
  confirm: {
    prompt: true
  },
  buttons: {
    closer: false,
    sticker: false
  },
  history: {
    history: false
  }
})

Solution

  • Managed to get the result I wanted by adding a custom css class to the confirm object. Working example http://jsfiddle.net/gusLfnux/2/

    css:

    .password {
       -webkit-text-security: square !important;
    }