How do I store URL parameter in user registration field? I'm trying to store a url variable into a field on the user registration page.


http://domain.com/user/register?aid=74


Can I use javascript to pull that variable and store it in one of the input fields?
Using hook_form_alter you can set the default value of your field to be this query parameter. 

function MY_MODULE_form_alter(&amp;$form) {
  $q = drupal_get_query_parameters();
  $form['parameter_field']['default value'] = check_plain($q['aid']);
}