Error enter value in text field - html

When i entering data in text field(other then 1st text field) of my html it will automatically reach first text field in my html form
<form name="f" action="product.php" method="post">
<td><h4><u>User Login:</u></h4></td>
<tr><td >Username:</td><td><input type="text" name="user" class="style" placeholder="Enter UserName" /></td></tr>
<tr><td>password:</td><td><input type="password" name="pass" class="style" placeholder="Enter Password" /></td></tr>
<tr><td></td>
<td><input type="submit" name="submit" value="submit" /><input type="button" name="newuser" value="Newuser"onclick="self.location="Newuser.jsp"" />`enter code here`</td></tr>
</form>

It could be because you are entering data in password before the page completely loads and when it does the cursor jumps to the username textbox, it being first in HTML. Happens with me often!

Related

Mail-based submission : Does not show in the body of the email

I have created a simple form (mail-based submission). However, when I submit and when I am directed to the mail app, I don't see the text I have input to the "First Name" and "Surname" box. Is there anything wrong with my code?
<form action="mailto:someone#mail.com" method="post" enctype="text/plain">
First name: <input type="text" name="firstname" /> <br/>
Surname: <input type="text" name="surname" /> <br/>
<input type="submit" value="Submit now" />
</form>

html- input tag drop down not showing for previous entered values

My input tag in a form is not showing the suggestions for previous entered values
<form target="temp" method="post" action="">
<input id="UserID" name="UserID" type="text" placeholder="User ID" autocomplete="on" spellcheck="false">
<input id="Password" type="password" placeholder="Password" spellcheck="false">
<input type="button" value='Submit' onclick="login();">
</form>
What is happening is:
I want it to be:
You can make most browsers display values previously entered in input fields by giving a name to the input.
Change first input to this:
<input id="UserID" name="UserID" type="text" placeholder="User ID" spellcheck="false">
UPDATE
Not sure what your onClick function is doing but...
Change type="button" to type="submit":
<input type="submit" value='Submit' />

populate HTML field from Hidden Field Value

I have 2 forms. On the first form I want to place the username in a hidden field. Then, on the second form I want to use that user name as the value of username field.
<form method="POST" name="form1" id="don_form1">
userName:<input type="text" name="uname">
Email:<input type="text" name="fname">
password:<input type="password" name="fname">
<input type="submit" name="submit_btn1" id="btn1"/>
</form>
<form method="POST" name="form2" id="don_form2">
userName:<input type="text" name="uname">
Age:<input type="text" name="fname">
Country:<input type="text" name="fname">
<input type="submit" name="submit_btn2" id="btn2"/>
</form>
So, on the second form I don't want the user to his user name again, as this field should be populated on its own. The forms are on 2 different pages of Wordpress.

Form not taking action

I have a problem with a form. It is not sending any action (page not even refreshing on click). If I copy the form in another document locally it has no problem, all working well, mail message being sent. Here is the code of the form:
<form method='post' name='ContactForm' id='contactForm' action='contact_main.php'>
<p>Your name:</p>
<input type="text" class="input-box" name="user-name" placeholder="Please enter your name.">
<p>Email address:</p>
<input type="text" class="input-box" name="user-email" placeholder="Please enter your email address.">
<p>Subject:</p>
<input type="text" class="input-box" name="user-subject" placeholder="Purpose of this message.">
<p class="right-message-box">Message:</p>
<textarea class="input-box right-message-box message-box" name="user-message" placeholder="Your message."></textarea>
<button type='submit' class='myinputbtn' name='submitf' id="submitf">Send your message</button>
<div id='message_post'></div>
<input type="hidden" name="contact">
</form>
Clicking the submit button results in... nothing!
Please let me know if I need to edit my question before downrating. Thanks!
Use
<input type="submit" ...
instead of a button (which is used with Javascript, not for form submitting)

HTML Contact Form Formats Email Strangely

I'm making a contact form that a user can type in then when they click submit it opens Outlook with their input. The problem is that the output is really messy. It outputs like this:
name=John+Smith&email=I+am+contacting+you&comment=example+text+here
I want to output to be more like:
name=John Smith email=I am contacting you comment=example text here
Is that possible with this HTML5 code:
<form method="post" name="contact" action="mailto:myemail#gmail.com">
<p>
<label>Name</label>
<input name="name" value="Your Name" input type="text" size="50" />
<label>Email</label>
<input name="email" value="Your Email" input type="text" size="50" />
<label>Your Comments</label>
<textarea rows="5" cols="5" name="comment"></textarea>
<br />
<input class="button" input type="submit" />
</p>
</form>
Since you have not specified otherwise, your form is “send” using the default enctype application/x-www-form-urlencoded.
Add the attribute enctype="text/plain" to your form element.