Jump to content

Adriano Faria

Clients
  • Posts

    31,964
  • Joined

  • Days Won

    476

Community Answers

  1. Adriano Faria's post in Adding a field to registration was marked as the answer   
    Quick example, obviously not tested:
    /** * Build Registration Form * * @return \IPS\Helpers\Form */ public static function buildRegistrationForm( $postBeforeRegister = NULL ) { $form = parent::buildRegistrationForm( $postBeforeRegister ); $form->add( new \IPS\Helpers\Form\Text( 'field_name', NULL, TRUE ), 'password_confirm' ); return $form; } /** * Create Member * * @param array $values Values from form * @param array $profileFields Profile field values from registration * @param array|NULL $postBeforeRegister The row from core_post_before_registering if applicable * @return \IPS\Member */ public static function _createMember( $values, $profileFields, $postBeforeRegister = NULL ) { $member = parent::_createMember( $values, $profileFields, $postBeforeRegister ); $member->field_name = $values['field_name']; $member->save(); return $member; }  
×
×
  • Create New...