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

edited November 2006 in Vanilla 1.0 Help
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.


  • Options
    To get additional user information, have a look at Applicant Discovery.

    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.
  • Options
    Interested in the same thing.

    @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.)
  • Options
    Thanks for replying to my query. I have downloaded the applicant discovery add on and have been trying to understand how it works. The forms that I have used on web sites are done by first displaying the HTML form and collecting the data from the fields. When submitted this is then passed to the php script which assembles an email containing the information. This is then mailed to the administrator. I assume that the discovery add on works in the same way BUT there is the interface to Vanilla to deal with. This is what I have to try to understand before I can attempt my own Vanilla add on form. I like the idea of using the form as part of Vanilla rather than having a separate form to collect and email the data. Any further help would be appreciated.
  • Options
    I am also using the Applicant Discovery extension as a guide to add a new field to the application form (a COPPA acknowledgement field). If I could figure out this one error I am getting, I could give you some help. Notice: Undefined property: User::$COPPA in D:\Program Files\xampp\htdocs\Vanilla.1\extensions\COPPA\default.php on line 66 This is line 66: <input id="txtCOPPA" type="text" name="COPPA" class="Input" maxlength="3" value="'.$ApplyForm->Applicant->COPPA.'" /> I think this has to do with the new field COPPA I added. Any help would be appreciated. Thank you, jim
  • Options
    I haven't done anything yet with the applicant discovery, but it looks mostly straightforward--except that the fields it adds already have their counterparts in the User class.

    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
  • Options
    I did correct the input and have set a default value to NO with your suggestion. Thank you. However, I get an sql error when I try to add the user. And that is because the procedure used by the Applicant Discovery extension won't work here. So, will adding new fields to any vanilla tables have to be handled in a different way?
  • Options
    edited November 2006
    It looks like there is another spot where we can use to attach that information...

    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');
  • Options
    edited November 2006
    I can't get that to work either. It doesn't know what COPPA is. It says undefined variable and then undefined index. I think the best course of action now is to create a new table in which to store the user meta data. Edit: And now that begs the question - what is the best way to handle additional data we want to collect? I've been playing around with this all afternoon with no success. I can get the info to display on the application and get a field to display, but I can't get the information in the field to be added to the new field.
This discussion has been closed.