We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 25842
    • 6 Posts
    Hey Guys!

    I noticed that when I started using the WebLogin snippet on my site, it used alot of elements that caused the site not to validate, which for me, is a BIG pet-peave.

    The reason it wasnt allowing the site to validate is because XHTML Strict doesnt allow <form name="">, and the fact that the weblogin core files were inserting the javascript code for dynamically switching forms right into the template, which W3C doesnt like at all.

    So I came up with a fix and uploaded it here. Just drop the files in your [modx_root]/assets/snippets/weblogin directory and go into your template chunks and change all of the WebLogin forms FROM <form name="weblogin" ... > and <form name="loginreminder" ... > TO <form id="weblogin" ... > and <form id="loginreminder" ... >

    Cheers!
      • 26693
      • 23 Posts
      Nice work on this Rylas. I was willing to turn a blind eye to the slight invalidation of my pages but it still wound me up a bit, glad someone with more programming experience than me sorted it out.

      Much appreciated smiley
        • 14050
        • 788 Posts
        Those validation warnings have always bothered me also, however when I uploaded your snippet it caused javascript errors to be detected because the FormLogin chunk calls the script with the argument document.loginfrm.password and I believe that a call like that is referencing the name attribute, and not the "id" attribute.

          Jesse R.
          Consider trying something new and extraordinary.
          Illinois Wine

          Have you considered donating to MODx lately?
          Donate now. Every contribution helps.