Click here to Skip to main content
16,019,018 members
Please Sign up or sign in to vote.
1.18/5 (3 votes)
See more:
Online Registration

Create an online registration form where user needs to enter the following details:

S.No

Label Name

Element Name

Description

Limitation/Constraints

1

User Name

username

The text "Enter User Name" should be displayed by default in the text box. When the user starts entering the name, this text should disappear

Is a mandatory field, should be validated. Should not allow any numbers and special characters other than space. Do not use java script, use HTML 5 features.

2

Password

password

To enter the password.

Is a mandatory field, should be validated. Minimum of 7 characters. Should have at least one special character and one number. Do not use java script, use HTML 5 features.

3

Address

address

To enter the address

Use textarea.

4

Country

country

An auto-complete feature should be available to the user for the following options.

India, America, China, Ireland

(Name of the auto-complete feature should be "countries")

Do not use combo boxes, rather it should be done using <input> element

5

Gender

gender

Select the gender.

Use radio button and it’s a mandatory field.

6

Languages Known

lang

Choose the languages known.

Use check box. Should have 3 checkboxes.

7

Submit

submit

Submit button should be an image.

 

9

Reset

reset

Button with Reset as label. On clicking this button, all fields should be reset

 

 

All the above fields are mandatory. When clicked on submit button, it should display "The form is submitted successfully" in success.html. The text should be in h4 tag.

Sample Webpage:



Note: Please Don't use short hand styles

Example: 

Set 1:

p{

margin: 100px 150px 100px 80px;

}

Set 2:

p {
    margin-top: 100px;
    margin-bottom: 100px;
    margin-right: 150px;
    margin-left: 80px;
}

Follow the set 2 solution 

Note:  Correctly specify the element name, as given in the requirement. All your html tags should be given in lower case.


What I have tried:

I dont know how to code this as I am new to html5
Posted
Updated 21-Aug-17 20:43pm
Comments
Kornfeld Eliyahu Peter 9-Aug-17 1:37am    
So where (and why) you got this assignment?
If you are interested in the HTML part only, all you need is a simple Google search...
Richard Deeming 9-Aug-17 10:20am    
If you don't know where to start, then talk to your teacher. That's what they're paid for!

1 solution

This is what i made. But it gives me an error "testWeb(htmlpackage.WebTestRegForm):
Should have got a tag with the name - username or file name should be regform.ht
ml
false"
Please tell me if it works for you or any change you did to make it work.
<html>
<body>
<form action="success.html">
User Name* 
<input type="text" name="username" placeholder="Enter User Name" required>
<br>
Password*
<input type="password" name="password" pattern="^(?=.*[A-Za-z])(?=.*\d)(?=.*[$@$!%*#?&])[A-Za-z\d$@$!%*#?&]{7,}$" required/>
<br>
Address <textarea name="address"></textarea>
<br>
Country <input list="countries" name="country">
  <datalist id="countries">
    <option value="India">
    <option value="America">
    <option value="China">
    <option value="Ireland">
  </datalist><br>
Gender* <input type="radio" name="gender" value="male" required>Male</input><br>
<input type="radio" name="gender" value="female" required>Female</input><br>
Languages Known* <input type="checkbox" name="lang" value="Hindi">Hindi</input><br>
<input type="checkbox" name="lang" value="English">English</input><br>
<input type="checkbox" name="lang" value="Tamil">Tamil</input><br>
<input type="image" name="submit" src="submit.png"/><br>
<input type="reset" name="reset"/>
</form>
</body>
</html>
 
Share this answer
 
Comments
Patrice T 22-Aug-17 4:48am    
You should open a new question [^]
and delete this as it is not an answer to the original question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900