Registration fields prefilled with URL parameters
Give this code a try: var query = window.location.search.substring(1); var paramList = query.split(‘&’); for (var i=0; i < paramList.length; i++) { var param = paramList[i].split(‘=’); if(param[0] == ’email’) { var element = document.getElementById(‘user_login’); if (element) { element.value = decodeURIComponent(param[1]); } } } I used the browser inspector console to test it out quickly and debug … Read more