We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 26435
    • 1,193 Posts
    Quote from: pixelchutes at Aug 15, 2007, 04:34 PM

    Cool stuff, Scotty!

    BTW, when I tried to register from the AJAX demo page, I clicked register and it appeared as if nothing happened at all. (I was watching where the other messages were appearing...)

    After waiting a little bit, I clicked register again, but didn’t see any type of "Loading..." message or anything to indicate action was occurring on the back end.

    I checked my email during the interim, and when I got back to the page it said something along the lines of "Sorry, this username is already in use."

    So, between my first click registering me and my 2nd click (preventing duplicate registration) I was somewhat confused...However, I do realize this is just a demo site, and I’m sure a loading indicator or disabled/hidden submit buttons could be added with ease to help streamline the registration process.
    Thanks for the feedback. I have been putting about 98% of my spare time into this snippet over the last 2-3 weeks and I just wanted to get it out and share it so I didn’t put a lot of effort in to the style and function of the demo site. It is just a basic example of how AJAX can be used in user management.

    The custom javascript file I wrote to handle the form hijacking is only a few lines of code, but adding more handlers for events and another animation to show a loading image while it is processing would be very simple.
    Quote from: pixelchutes at Aug 15, 2007, 04:34 PM

    I also like how initial registration is no more than name/email/username smiley Is this portion customizable? (e.g. maybe gender and country are required @ registration?)
    Yes, every possible view can be templated with chunks. If you download the WebLoginPE package from the MODx Repository, there is documentation on all the parameters, template parameters, and placeholders. You can use as many or as few of the fields from web_user_attributes as you like.

    The difference between an "instant" registration and a "verify" registration (the one you experienced was "verify") is that the "instant" registration lets the applicant choose their password, the "verify" registration randomly generates a password so the user is forced to give a real email address (if they want to log in to your site! wink ).

    -sD-
    Dr. Scotty Delicious, Scientist DFPA.
      Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
      All of the above... in no specific order.


      I send pointless little messages
    • Quote from: Dr. at Aug 15, 2007, 05:02 PM

      Quote from: pixelchutes at Aug 15, 2007, 04:34 PM

      Is this portion customizable? (e.g. maybe gender and country are required @ registration?)

      Yes, every possible view can be templated with chunks. If you download the WebLoginPE package from the MODx Repository, there is documentation on all the parameters, template parameters, and placeholders. You can use as many or as few of the fields from web_user_attributes as you like.


      So are you saying just by adding a field from web_user_attributes to the registration chunk that it automatically becomes required?

      I am curious of your opinion in best handling required/non-required registration fields--outside of Name/E-mail/username--should it come up.

      I have reviewed the docs and the code and it looks very good! Much more organized than the current weblogin snippets.

      Shortly I will be implementing into a current instance that also leverages a custom "web_user_attributes_extra" table. I will post the code that allows for "eXtended profiles", as I call it. cool


        Mike Reid - www.pixelchutes.com
        MODx Ambassador / Contributor
        [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
        ________________________________
        Where every pixel matters.
        • 26435
        • 1,193 Posts
        Quote from: pixelchutes at Aug 15, 2007, 07:48 PM

        So are you saying just by adding a field from web_user_attributes to the registration chunk that it automatically becomes required?

        I am curious of your opinion in best handling required/non-required registration fields--outside of Name/E-mail/username--should it come up.

        I have reviewed the docs and the code and it looks very good! Much more organized than the current weblogin snippets.

        Shortly I will be implementing into a current instance that also leverages a custom "web_user_attributes_extra" table. I will post the code that allows for "eXtended profiles", as I call it. cool

        Not exactly. The documentation in the package has more details, but basically there are only 4 default required fields (email, fullname, username, and passwrord) or if register type is verify then password is not a required field, but if &capthca is true then formcode IS a required field.

        What I was trying to explain in my last post is that with the templating system, if you want to do a "verify" registration, but you want additional fields, you must supply ALL the required fields (email, fullname, username) but you can also request any or all of the other fields as well. So in your custom form you might have email, fullname, username, dob, country, and comment.

        -sD-
        Dr. Scotty Delicious, Scientist DFPA.
          Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
          All of the above... in no specific order.


          I send pointless little messages
        • Good to know.

          I guess my question really is, "Does it take modifying the Class directly (included .php file) to MAKE a registration field required?

          In other words, say if I wanted Mobilephone to be a required registration field (verify or instant), I know I’d need to override the default chunk and add the form input manually to capture at point of registration. However, in doing just these steps, the Mobilephone field would not be required, client|server-side...
            Mike Reid - www.pixelchutes.com
            MODx Ambassador / Contributor
            [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
            ________________________________
            Where every pixel matters.
            • 26435
            • 1,193 Posts
            Quote from: pixelchutes at Aug 15, 2007, 08:14 PM

            Good to know.

            I guess my question really is, "Does it take modifying the Class directly (included .php file) to MAKE a registration field required?

            In other words, say if I wanted Mobilephone to be a required registration field (verify or instant), I know I’d need to override the default chunk and add the form input manually to capture at point of registration. However, in doing just these steps, the Mobilephone field would not be required, client|server-side...
            Exactly right.
            And you have sparked my imagination. In version 1.0.1(I will put it together tonight) I will add another parameter &regRequired=(email,username,mobilephone,dob), then In the class I will explode the var and do an isset or empty check in a for each block! What do you think?

            -sD-
            Dr. Scotty Delicious, Scientist.
              Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
              All of the above... in no specific order.


              I send pointless little messages
            • Quote from: Dr. at Aug 15, 2007, 08:33 PM

              Exactly right.
              And you have sparked my imagination. In version 1.0.1(I will put it together tonight) I will add another parameter &regRequired=(email,username,mobilephone,dob), then In the class I will explode the var and do an isset or empty check in a for each block! What do you think?

              -sD-
              Dr. Scotty Delicious, Scientist.

              Beautiful! IMHO, a definable list of required fields (since no eForm integration) is a great way to go! Again, I personally enjoy the minimal sign up requirements, but I easily foresee some clients requiring more up front.
                Mike Reid - www.pixelchutes.com
                MODx Ambassador / Contributor
                [Module] MultiMedia Manager / [Module] SiteSearch / [Snippet] DocPassword / [Plugin] EditArea / We support FoxyCart
                ________________________________
                Where every pixel matters.
                • 26435
                • 1,193 Posts
                Quote from: pixelchutes at Aug 15, 2007, 08:41 PM

                Beautiful! IMHO, a definable list of required fields (since no eForm integration) is a great way to go! Again, I personally enjoy the minimal sign up requirements, but I easily foresee some clients requiring more up front.
                Alright, I think I have the &regRequired parameter working with a foreach loop. I will do some testing on it tonight and tomorrow and then commit it to version 1.0.1.

                Any other suggestions from anyone?

                -sD-
                Dr. Scotty Delicious, Scientist.
                  Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                  All of the above... in no specific order.


                  I send pointless little messages
                  • 16194
                  • 103 Posts
                  Quote from: Dr. at Aug 16, 2007, 02:05 AM


                  Any other suggestions from anyone?


                  The already mentioned cookie expiry option would be a really cool feature!
                    Impossible is nothing - with ModX
                    • 26435
                    • 1,193 Posts
                    Quote from: Konsum at Aug 16, 2007, 07:20 PM

                    Quote from: Dr. at Aug 16, 2007, 02:05 AM


                    Any other suggestions from anyone?


                    The already mentioned cookie expiry option would be a really cool feature!

                    I agree, and I think that is totally doable!

                    -sD-
                    Dr. Scotty Delicious, Scientist.
                      Husband, Father, Brother, Son, Programmer, Atheist, Nurse, Friend, Lover, Fighter.
                      All of the above... in no specific order.


                      I send pointless little messages
                      • 16194
                      • 103 Posts
                      What about adding a field to easily insert custom Terms of use? A user should need to accept the Terms upon registering.
                        Impossible is nothing - with ModX