I searched the web for a way to do this with no success, and I ended up modifying the code myself.
These
instructions show you how to add your custom field in the CB
registration form, and have it included in the automated email sent to
the administrator.
1. In Administrator, Go to Components>CB>Field Management.
2. Add your information according to your desired field.
Important!
Jot down the field Name as it appears after you type it in. Community
builder should add a cb_ prefix to the name. This will be the name as
it appears in the database, and you will need it for the following
steps.
Make sure you select YES for the “show at registration?”
option. If you’re only using this custom field for your own reference,
you’ll want to make sure you select NO for the “show on profile” option.
3. Save changes.
4. Navigate to your CB registration via the frontend and make sure the field appears properly.
5. Now, you will modify the following files. Please backup original versions.
components/com_comprofiler/plugin/language/default_language/default_language.php
and
components/com_comprofiler/plugin/user/plug_cbcore/cb.core.php
6. In default_language.php around line 329, find the following code.
and right below it, add your custom language following the same format.
The first part is the label you will see in the administrator email,
and the part in the brackets [ ] is where you plug in the database name
from step 2. Also, keep in mind that the trailing n’s represent spaces,
so adjust those accordingly if you want a neat email. The final code
should look like this:
Note: You should also add the above custom code around line 355 as well.
Save all changes and upload to your server.
Do a test registration, and your new field should appear in the email to you (the administrator). Pretty cool!
|