How do I pass a value from the url to a custom field in the registration form? I know variations of this question have been asked but I haven't found any with this specific set of characteristics. Also, the only programming language I know is python. I don't know PHP at all.

I want to be able to pass the value from a url parameter into a custom hidden field in the registration form.

I've tried using theme functions, template files, and hook_form_alter() but I haven't been able to get any of these to work. 

So far, I've been able to add the custom field but I can't seem to hide it, let alone be able to pass the value to it. I am able to add html to the form via the template file but that's about it.

I based my attempts on this site: themery

This is the code I tried to see if I could alter the label for email.

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


$form['mail']['#title'] = t('E-mailzzzzzz');
$form['field_recipientid']['#title'] = t('QualID'); //this is the custom field


}


...but it didn't work.

this is the form id:

&lt;input type="hidden" name="form_id" value="user_register_form" /&gt;


this is the HTML that's rendered for the custom field:

&lt;input class="text-full ckeditor-mod form-text" type="text" id="edit-field-recipientid-und-0-value" 
name="field_recipientid[und][0][value]" value="[url:path]" size="90" maxlength="25"&gt;


EDIT: June 17, 2013
Someone gave me this code as a solution but I don't understand if it will work or how it will work:

function passval_user_presave(&amp;$edit, $account, $category) {
    $fields = array(
    'RecipientID' =&gt; array('fieldname'=&gt;'field_recipientid', "type"=&gt;'complex'),
        'mail' =&gt; array('fieldname'=&gt;'mail', "type"=&gt;'simple'),
    );
    $urlargs = drupal_get_query_parameters();
    foreach($fields as $key=&gt;$field) {
        if(isset($urlargs[$key])) {
            $value = ($urlargs[$key]);
            $value = intval($value);
            if($field['type'] == 'complex') {
            $edit[$field['fieldname']] = array('und'=&gt;array(0=&gt;array('value'=&gt;$value, 'format'=&gt;'', 'safe_value'=&gt;$value)));
        }
        else {
            $edit[$field['fieldname']] = $value;
            }               
        }
    }
}
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.