1 Reply Latest reply on Nov 28, 2009 9:54 AM by James_PT

    Login page / registration page show if/else?

    meezone

      Hi,

       

      If a user is registered. The column 'active_usr' gets the value '1'

       

      On the default loginpage page i have two forms ('login form' and 'register new user form')

       

      - I want users how has already registered see only the 'login form' (on the 'loginpage')

       

      - I want users how has not registered yet and are redirected to the 'loginpage' if the want to enter a restricted page >> show the 'register new user form'

       

       

      (i use ADDT and php / MySQL)

       

      Is this possible?

       

       

      thanks!

        • 1. Re: Login page / registration page show if/else?
          James_PT Level 1

          I think you would be further ahead if you split the one page with two forms, one for login and one for registration, into two pages, one for each.  Typically, a link on the login page to something like "Not Registered? Click Here", would take them to the registration page.  You can more easily manage the experience that way - only sending those who need to register to the registration form.  If you are using the ADDT login server behavior, then you can check whether the value in the active_usr column == 1 and if so, send them to the login page, otherwise send them to the registration page.  I think you will also find this easier to maintain in the future.

           

          If you want to keep both forms on the same page, you can try wrapping the entire form(s) in a conditional "Show If Conditional" statement, displaying the login page if the active_usr column = 1 and hidding the registration page if the active_user = 1, then reversing if the column is 0, or null, or whatever you've specified.

           

          Keep in mind also that ADDT only allows one ADDT generated form per page.