This topic is locked
[SOLVED]

 2 different registration forms

10/30/2012 10:02:20 AM
PHPRunner General questions
khalil author

Hello,
I have a jobs application, where users can register as Job Seekers or Companies, both use the same table "users" but some fields will show to job seekers and others for companies, now I managed to get everything done, the only question is the users registration.

I need to have 2 separate users registration forms, one for Job Seekers and one for Companies, what would be the best way to establish that?
I was thinking maybe I can pass a variable to the registration page and I show the proper form depending on this variable, but is there another way? maybe I can simply duplicated the registration form in the output folder?
Thanks!

Khalil

Sergey Kornilov admin 10/30/2012

You have two options here.

  1. If Job Seekers and Companies are stored in the same database table you can add a simple Lookup field with two values (JobSeeker/Company) and us the same registration form for both types of users.
  2. If Job Seekers and Companies are two different tables you can have a switch somewhere on your main page like:

    Register as a company

    Register as a job seeker
    First link should point to companies_add.php, while second should point to jobseekers_add.php. This is it.

khalil author 10/30/2012



You have two options here.

  1. If Job Seekers and Companies are stored in the same database table you can add a simple Lookup field with two values (JobSeeker/Company) and us the same registration form for both types of users.
  2. If Job Seekers and Companies are two different tables you can have a switch somewhere on your main page like:

    Register as a company

    Register as a job seeker
    First link should point to companies_add.php, while second should point to jobseekers_add.php. This is it.


Thank you for your reply!
Option one is the one I'm trying to work on, but the thing is some fields should not appear on JobSeeker form and others should not appear on Company form...
However, option 2 would be ideal! the only problem is with the Security settings of the application, there I'll have to specify one table for username and password, I know I can have a user_id field in Companies and Jobseekers tables, and keep the users table light with username and password and email, but in this case, I'll face another problem in the registration page, registration will have to be done in 2 steps...

khalil author 10/31/2012



You have two options here.

  1. If Job Seekers and Companies are stored in the same database table you can add a simple Lookup field with two values (JobSeeker/Company) and us the same registration form for both types of users.
  2. If Job Seekers and Companies are two different tables you can have a switch somewhere on your main page like:

    Register as a company

    Register as a job seeker
    First link should point to companies_add.php, while second should point to jobseekers_add.php. This is it.


Will I face any problem if I simply duplicate the registration files and customized each one?

I think this can be a candidate for a new feature in the next release! allowing users to have multiple registration forms...

Sergey Kornilov admin 11/1/2012

This question doesn't make any sense.
If you store all registration data in one database table - you can use a single registration form with simple JobSeeker/Company switch.
If you want to store data in two diffeent tables meaning Company and JobSeeker need to fill different set of fields - there is nothing to duplicate as form are supposed to be different.

khalil author 11/1/2012



This question doesn't make any sense.
If you store all registration data in one database table - you can use a single registration form with simple JobSeeker/Company switch.
If you want to store data in two diffeent tables meaning Company and JobSeeker need to fill different set of fields - there is nothing to duplicate as form are supposed to be different.


I'm trying to use the "Registration" pages created by PHPRunner, to benefit from the double opt in and the password reminder etc...

That's the registration page I want to duplicate since I can't use one registration page with a simple switch between Companies and Job Seekers, each of these need different fields for registration.

Sergey Kornilov admin 11/1/2012

If these two forms have different set of fields - what exactly you want to duplicate?

khalil author 11/1/2012



If these two forms have different set of fields - what exactly you want to duplicate?


Well 70% of the fields are in common, so in the table, I have all the fields for both Companies and Job Seekers, and in the pages I use the ones I want for each registrant...that's why I want to duplicate it...