type='password' on TextField input

default discord avatar
7wonders
6 months ago
4

Is there a quick and easy way to add the 'password' type on the default text field? I am guessing not. It would be a nice feature to add to the admin config for text fields i.e. secure=true or whatever. In the meantime, whats the absolute easiest way to override the default TextField component with type='password'?



Well I guess:


import Password from 'payload/dist/admin/components/forms/field-types/Password' admin: { components: { Field: Password } }
  • default discord avatar
    dsod
    6 months ago

    This is how I did it as well.

  • default discord avatar
    7wonders
    6 months ago

    Great minds think alike 😉

  • default discord avatar
    dsod
    6 months ago

    For sure! 😄

Open the post
Continue the discussion in Discord
Like what we're doing?
Star us on GitHub!

Star

Connect with the Payload Community on Discord

Discord

online

Can't find what you're looking for?

Get help straight from the Payload team with an Enterprise License.