Subusers Form Customization

Discussion in 'Templates customization' started by rchristen, Dec 21, 2012.

  1. rchristen

    rchristen New Member

    Joined:
    Jan 18, 2009
    Messages:
    6
    I have installed the subuser plugin. I would like to add three field to the forms that display subuser info and for adding a subuser.

    How can I customize the subuser info fields and "add subuser" form?

    Ryan
  2. rchristen

    rchristen New Member

    Joined:
    Jan 18, 2009
    Messages:
    6
    Sure could use some help. I am trying to create a hidden field within the subuser, "add user" form. I need to 1) find how this form is processed, 2) add the hidden field. Any help from anyone would be appreciated.

    ryan
  3. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Ryan,
    In order to add your field to form you have to edit /amember/application/subusers/library/Am/Form/Subuser.php
    You can add fields to init method. That is an instance of HTML_QuickForm2 and supports all elements from HTML_QuickForm2
    In order to use form values edit /amember/application/subusers/library/Am/Grid/Editable/Subusers.php
    you have to add your code to Am_Grid_Editable_Subusers::beforeInsert method.

Share This Page