Is there a way to pass a form #value to the form #action in Drupal 7 form API?
In FAPI, #action changes the form's action parameter, which, you should not override if you want to make Drupal handle the submission. 

In your case, you need to define a custom submit handler and redirect the user in that function. You could do something similar by changing the form's method to GET, but it is not possible to define a complex path like the one you want. 

Remove this line:

$form['#action'] = url('http://example.com/name_storage/' . $form['first_name']['#value'] . '/'. $form['first_name']['#value'] . '/' . $form['passcode']['#value']);


Then, add a new submit handler like this:

function my_module_form_submit($form,&amp;$form_state) {
  $values = $form_state['values']['first_name'] . '/'. $form_state['values']['last_name'] . '/' . $form_state['values']['passcode'];
  $form_state['redirect'] = 'name_storage/' . $values;
}


To set the redirect parameter to an external URL, you can do this:

$values = 'http://example.com/name_storage/';
$values .= $form_state['values']['first_name'] . '/'. $form_state['values']['last_name'] . '/' . $form_state['values']['passcode'];
$form_state['redirect'] = array(
  $values,
  array(
    'external' =&gt; TRUE,
  ),
);