I am going to be using Drupal in an upcoming project. I will need to extend the details that users enter in at login, such as regional information and some other custom stuff. I was wondering if anyone has any good recomendations on how to produce a module that does not make me an island in the Drupal world. I don't want to build this module, and then be stuck in no mans land(ala Mambo). I have a lot of registration info to collect, so I will need to stretch the registration process over three seperate form submittals... anyone have a clever idea for how to do that...?
Right now, I am taking the original user module and modifying it to suit my needs. Its really obvious how to add and remove registration details and forms in there, but it would be even nicer if you could do it dynamically from an administration page...
So, any thoughts?
Comments
profile.module
Hi Alan,
Before you start creating a module, I recommend you check out the out-of-the-box profile.module with Drupal.
hope that helps.
Dub
Currently in Switzerland working as an Application Developer with UBS Investment Bank...using Drupal 7 and lots of swiss chocolate
I solved this without the
I solved this without the profile.module because I needed a three-step-registration-process (and I did not like the standard form-layout of drupal).
My registration-process is divided into the following steps:
1. user registrates with the built-in form
2. the password is sent to the new user
3. the user logs in
4. my custom module checks in the hook_menu if the user has finished the registration process, if not, it jumps to my custom registration-page via drupal_goto, where the user can finish his registration.
5. after successful registration, a flag is stored inside a custom databasetable
so no weird hacking inside the user.module necessary.
This is why I like drupal so much, you can do whatever you want, even without hacking the core-files :)
HTH ...
Could use CiviCRM Stand Alone Profiles
CiviCRM is a robust constitutent relationship management system. It have been tigtly integrated with Drupal.
CiviCRM provides a replacement to the built in drupal profile functionality, with data saved to the CRM record. CiviCRM profiles can be stand alone HTML forms, which would handle your multi-step use case.
Docs:
http://objectledge.org/confluence/display/CRM/Configure+CiviCRM+Profile
David Geilhufe
Social Source Foundation
Try CiviCRM http://www.openngo.org/
interesting.
This is exactly what I was thinking. And the profile module where you can add fields was another idea. I need to be able to track regional info with a custom module... so having it in seperate fields or tables is especially important. Would you be willing to share your code?
--Alan
CiviCRM is freely downloadable and integrated into CivicSpace
You can download CiviCRM from www.openngo.org (right sidebar).
Or download CivicSpace if you prefer an automated installer. Link to civicspace download at www.openngo.org, right sidebar.
David Geilhufe
Social Source Foundation
Try CiviCRM http://www.openngo.org/
stephanmaximili: Multi Page registration
Sorry, I should have quoted you directly, I meant YOUR method seemed exactly what I was thinking of doing. Are you willing to share some of your code on that? I have never developed a drupal module before, so I would appreciate a good example of how you hooked into the core like that...
Some basic overview
Some basic overview docs:
http://objectledge.org/confluence/display/CRM/CiviCRM+and+Drupal
(more on the wiki)
Review the .module file which contains all the drupal specific code:
http://svn.civicrm.org/trunk/modules/civicrm.module
David Geilhufe
Social Source Foundation
Try CiviCRM http://www.openngo.org/
please no CRM
Thank you for your comments regarding the CRM, but I am not interested in such a comprehensive solution.
Here is what I want to do:(similiar to stephanmaximili)
1. User requests registration
2. If they are user type A, flag as that user. If type B, flag appropiate (User name,password,email)
3. Depending on user type, reveal appropiate reg info. Registration should be split into 3 seperate page requests, as there is a lot of info, and it is all categorized.
4. Process all the data. If the user is type A, setup as normal contributer. If the user is type B, setup as a subsite owner.
....ideas???
Sorry, I missed your reply
Sorry, I missed your reply...
I can't share the code, because it would be too complicated to understand :)
Anyway, here are the main-concepts: I check in the hook_menu if somebody is logged in, and if so, if he has completed my registration-page. If not the user is forwarded to a special page, where he can start registering.
We need a special permission, so we can fine tune the registration
we check if the user has completed the registration in the hook_menu
This function checks, if the user is an an admin or has no rights to complete registration
Thsi function queries a table and where additional infos about the registrationprocess is stored
This function is called, when the user visits user/complete_registration:
It should render your forms and validates them... (This is hard stuff, but doable :))
anyway it is a little bit messy, but perhaps you'll get idea. You should also check the documentation and handbooks for developing modules on drupal.org.
HTH,
Stephan
2 different registration forms
Can we use 2 different registration forms having different fields can you have me in this?