How do I pass a value from the url to a custom field in the registration form?
You can create hidden form elements in drupal simply by setting the type to hidden. So in your case, it could be achieved like so:

$form['field_recipientid']['#type'] = 'hidden';


You can access URL arguments in drupal via the arg() function. So if you want to pass something to the user register page and set it in your field_recipientid, you could do it by sending the user to the registration page via "http://example.com/user/register/MLRP_8UByesUEfeeIA".

Then from your same form alter function, just call arg(2) to get the third item in the path and set the value like so:

if (isset(arg(2))) {
  $form['field_recipientid']['#value'] = arg(2);
}


Note for anyone else thinking of doing this on other form elements that aren't hidden (e.g. text fields), use #default_value. If you set #value on text fields, drupal forcable only accepts that value, and disregards any edits to the text field value, the user might have made.

For more information on drupal's form api, see the forms api reference page on the drupal api site.