Vanilla 1 is no longer supported or maintained. If you need a copy, you can get it here.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.
Customising the new member form
I have just installed Vanilla and want to use it as a closed forum for club members only. I need to collect extra information in the same way that happens for this forum.
How can I customise the form by adding extra fields ?
Can I have the form sent to a second administrator for processing ? If so where do I put his email address.
0
This discussion has been closed.
Comments
For sending notice to a second administrator, the email should be configured in his or her profile and make sure that the role for the administrator has 'Notify by email of new applicants' checked in their role permissions.
@Wall: any suggestions on how to integrate external forms? (did not look into this yet, but e.g. a post-back?)
As an alternative, I'd be very interested in a mechanism to allow an admin to add new members via EMAIL
or some kind of external API (REST etc.)
Since there is no $User->COPPA attribute, the value from discovery should either be passed to its own function that saves the value or added to the user class (Or even possibly piggybacked in the user class on the Attributes array?)
It looks like the values from the from can be accepted via the ForceIncomingString function--In Jim's case, I would set line 66 value="" (since we probably won't be displaying the COPPA value back to the user) and the form processing should probably be something like $COPPA = ForceIncomingString('COPPA', ''); then followed by some code that saves the $COPPA to the database.
There are also ForceIncomingArray, ForceIncomingInt and ForceIncomingBool functions that retrieve values from forms or query strings. They are all coded in library\Framework\Framework.Functions.php
Look in library/People/People.Class.UserManager.php, at line 235 there is a delegate that you can attach to. This code assumes you have a field in the user table named COPPA:
function COPPA_InjectSQL(&$UserManager) { $s = &$UserManager->DelegateParameters['SqlBuilder']; $s->AddFieldNameValue('COPPA', $COPPA); } $Context->AddToDelegate('UserManager', 'PreDataInsert', 'COPPA_injectSQL');