Parsing form submitted values - D7 Could anyone please point out where I might be doing something wrong? I can't seem to capture the form values to manipulate them when this form is submitted.

   function admin_score_table_block_view($delta = '') {
      //The $delta parameter tells us which block is being requested.
        switch ($delta) {
            case 'admin_score_table':

                $block['subject'] = t('Admin Editable Score Table');
                $block['content'] = '';
                global $user;

            $form = drupal_get_form('admin_scores');

            $block['content'] = $form;

        break;
    }
    return $block;
}


function admin_scores($form) {
  if ($node = menu_get_object()) {
        $node = node_load($nid = $node-&gt;nid);

        $programmetmp = $node-&gt;field_sportevent_cd;
        $programme = $programmetmp['und'][0];
    }

    $form['#tree'] = 1;

    $result = db_query("SELECT cdt.entity_id AS nid FROM field_data_field_team_corpdec AS cdt WHERE cdt.field_team_corpdec_nid = " . $programme['nid']);
    foreach($result as $row){
        $team = node_load($row-&gt;nid);

        $form[$team-&gt;nid]['nid'] = array(
            '#type' =&gt; 'hidden',
            '#value' =&gt; $team-&gt;nid,
        );
        $form[$team-&gt;nid]['team'] = array(
            '#type' =&gt; 'textfield',
            '#value' =&gt; $team-&gt;title,
            '#title' =&gt; 'Team',
            '#attributes' =&gt; array('class' =&gt; 'field-team'),
            '#name' =&gt; 'team[' . $team-&gt;nid . ']'
        );
        $form[$team-&gt;nid]['score'] = array(
            '#type' =&gt; 'textfield',
            '#value' =&gt; '',
            '#title' =&gt; 'Score',
            '#attributes' =&gt; array('class' =&gt; 'field-score'),
            '#name' =&gt; 'score[' . $team-&gt;nid . ']'
        );
    }

    $form['submit'] = array(
        '#type' =&gt; 'submit',
        '#value' =&gt; 'Save scores',
    );

    return $form;
}


function admin_scores_form_submit($form, &amp;$form_state){
    var_dump($form_id);

}
Your form is called admin_scores() but your submit function is called admin_scores_form_submit()...this isn't Drupal's naming convention so your submit handler will never be executed.

Either change the name of your submit handler:

function admin_scores_submit($form, &amp;$form_state) {

}


Or add your non-standard submit handler in the form itself:

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


Also the signature you're using for your form function is slightly wrong, in Drupal 7 it's like this:

function admin_scores($form, &amp;$form_state) {