Save certain registration fields elsewhere in database This is for Drupal 7. I am trying to write my first real custom module but I'm running into some difficulty and I'm just not sure how to look for my answers. 

I've created a new entity for my module (with Entity API) with a corresponding table in the database. I need to add records to this table upon new user registration. I've used Form API to add a new field to the user registration form but I'm not quite sure the best way to do the next step. When the registrant submits the form, I would like all the regular Drupal registration stuff to happen, but I would like to intercept this one field and have its data go to the table I've created for my entity.

Here's what I have in the .module file of my custom module (the part concerning the registration form):

/**
* Implement hook_form_user_register_form_alter()
*/
function my_module_form_user_register_form_alter(&amp;$form, &amp;$form_state, $form_id){
    //add my module textbox to the registration form
    $form['my_module_field'] = array(
        '#type' =&gt; 'textfield',
        '#title' =&gt; t('My Module field'),
        '#required' =&gt; TRUE,
    );
    $form['submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; 'New Submit Button',
        '#submit' =&gt; array('my_module_form_submit'),
    );
    unset($form['actions']);
}//end my_module_form_user_register_form_alter

/* Custom Submit handler */
function my_module_form_submit($form, $form_state){
    db_insert('my_entity_table')-&gt;fields(array(
        'my_entity_item' =&gt; $form_state['values']['my_module_field'],
    ))-&gt;execute();
    drupal_set_message('Your information has been saved.');
}//end my_module_form_submit


This is working fine to get my special field in my special table. But the user is not created. I suppose I could do it manually (like enter the other information into the appropriate users table and everything) but obviously I would rather not do that manually.

I feel that I must be missing something obvious here but I'm not having any luck searching for it. I am self-taught in the little I know of programming and Drupal.

Is there a way for me to just jump in to the regular submission handler and say, "hey, put my field here instead!"?

Thank you for your time.
Wow. I puzzled on this all day and 30 minutes after asking this question, of course I find the answer.

Since the $form['submit'] part is an array, you can have more than one handler there! I changed the lines

$form['submit'] = array(
    '#type' =&gt; 'submit',
    '#value' =&gt; 'New Submit Button',
    '#submit' =&gt; array('my_module_form_submit'),
);
unset($form['actions']);


to simply be

$form['#submit'][] = 'my_module_form_submit';


and that's it! Now it does the regular registration submission handler and also mine.

Thanks!