So basically all I want to do is when someone fills in a login name and pass in the login block of my site, and they aren't a registered user, instead of just giving them the "you dont exist" error, take the info they entered, load up the registration page for them and autofill in the appropriate fields with what they entered, letting them takeover the rest of the duties from then on.

So basically just passing the form variables to the registration form, however, simply passing ?name=blah&pass=blah as the URL isn't working. Is there some other easy way of doing this?

Comments

AppleBag’s picture

Bueller?

hacmx’s picture

you can try adding this in page-tpl.php:

  $name=$_GET['name'];
  $pass=$_GET['pass'];

and

<script type="text/javascript">
$(document).ready(function() {
   var myname = '<?php echo $name ?>';
   var mypass = '<?php echo $pass ?>';
      $('input[name$="name"]').val(myname);// find input with name = "name"
      $('input[name$="password"]').val(mypass);// find input with name = "password"
 });
</script>
AppleBag’s picture

Thanks for help, it's getting stuck at the

<?php
	/* Store the entered name/pass for later */
	$name = $_GET['name'];
  $pass = $_GET['pass'];

/* Begin Debug Code */
if (!empty($name)) {watchdog('DEBUG', $name, WATCHDOG_NOTICE);}
/* End Debug Code */
?>

part already. Entering a login/pass doesn't get saved to the vars. No luck using $_SERVER['QUERY_STRING'] either. Any ideas?