passing the email as username in a form submission

hbmarar 0 Tallied Votes 148 Views Share

we have a form and if we would like to pass some hidden fields.say,username is hidden but required and email and password is what the user form is about:-

<html>
<head>
<title>Untitled Document</title>
<script language="javascript">
function fillname(val)
{


document.form1.textname.value=val ;

}
</SCRIPT>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>

<body>
<form name="form1" method="post" action="">
  user email  <input type="text" name="txtmail" onChange="fillname(this.value)">
   <input type="hidden" name="textname">
</form>
</body>
</html>
Member Avatar for LastMitch
LastMitch

we have a form and if we would like to pass some hidden fields.say,username is hidden but required and email and password is what the user form is about:-

I don't quite understand how this code snippet runs because it doesn't really do anything.

I attached an image on how it looks like:

611cc913060ec0b9cceb57d02ca7bf59

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.