Skip to main content

How to fix hide/show password functionality across multiple forms on the same page?

Hey guys!

I had a problem with multiple forms on one page, or rather with the hide/show password functionality. If there is more than one form on the page where the hide/show password functionality is configured, it stops working.

If there is only one form on the page, everything works fine. There seems to be a conflict between attributes or IDs. Is there any way to resolve this?

2 comments

  • Duncan from Memberstack
    Duncan from Memberstack Official comment

    Hi Valdis Zhvaginsh ๐Ÿ‘‹

    Checkout this new version of the show hide password code. It uses data attributes instead of ids and should fix the issue.ย 

    https://www.memberstack.com/scripts/45-show-hide-password

  • Josh Lopez
    Josh Lopez

    Hey Valdis Zhvaginsh ๐Ÿ‘‹

    I have seen this come up before when multiple forms have the same IDs. According to W3 Schools IDs need to be unique. You can read more here. Try making each ID unique and see if that fixes the error. If it doesn't please let us know and we can look further. ๐Ÿ™

    0

Please sign in to leave a comment.

Sitemap