CodeSolved

Solved Programming Questions & Exercises

Registration form

Practice Easy 44/ Download 4219 Views Most popular

Design a form to get the following information using the best elements from the user and to the pageregister/In the waypostSubmit

Name
Last name
Gender
Age
City
Favorite color
Date of birth
Mobile number
Address

12 Answers

This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
This answer is only visible to premium members
This answer is only visible to premium members
This answer is only visible to premium members
let msg = 'error'
alert(msg) 
This answer is only visible to premium members
This answer is only visible to premium members

This answer is only visible to premium members

Subscription is currently unavailable.
nem=input("your nem")
nam khanavadegi=input("your nam khnavadegi")
jensit=input("your jensit")
san=input("your san")
shehar=input("your shehar")
favorite color=input("your favorite color")
Date of birth=input("your Date of birth")
mobile number=input("your mobile number")
address=input("your address")
print(ok)

User 4707 Download Python
<!DOCTYPE html>
<html lang="fa">
	<head>
		<meta charset="utf-8" />
		<title>sign up form</title>
		<style>
			fieldset{
				width: 400px;
				background-color: lightblue;
				border-radius: 10px;
				margin-left: 25%;
				margin-right: 25%;
			}
		</style>
	</head>

	<body>
	<form action=" register/" method="post">
	<fieldset>
		<legend><h4 style="background-color: #ffffff;border-radius: 5px">sign up form:</h4></legend>
		<lable for="fname">first name:</lable><br>
		<input type="text" id="fname" name="fname" placeholder="shahrooz"
		style="border-radius: 5px;" ><br>

		<lable for="lname">last name:</lable><br>
		<input type="text" id="lname" name="lname" placeholder="chegini"
		style="border-radius: 5px;"><br>

		<lable for="gender">gender:</lable><br>
		<lable for="gender">male:</lable>
		<input type="radio" id="gender" name="gender">
		<lable for="gender">female:</lable>
		<input type="radio" id="gender" name="gender"><br>

		<lable for="age">age:</lable><br>
		<input type="text" id="age" name="age" placeholder="18"
		style="border-radius: 5px;"><br>

		<lable for="city">city:</lable><br>
		<input type="text" id="city" name="City" placeholder="Tehran"
		style="border-radius: 5px;"><br>

		<lable for="color">favourite:</lable><br>
		<input type="text" id="color" name="favourite" placeholder="Red"
		style="border-radius: 5px;"><br>

  		<label for="birthday">Birthday:</label><br>
  		<input type="date" id="birthday" name="birthday"
		style="border-radius: 2px;"><br>

		<label for="phone">phone number:</label><br>
		<input type="tel" id="phone" name="phone" placeholder="09120000000"
		style="border-radius: 5px;"><br>

		<label for="address">address:</label><br>
		<input type="text" id="address" name="address" placeholder="adress"
		style="border-radius: 5px;width: 60%;"><br>
		
		<input type="submit">
	</fieldset>
	</form>
	</body>
</html>
<!DOCTYPE html>
<html lang="fa">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>فرم ثبت نام</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            background-color: #f4f4f4;
            padding: 20px;
        }
        form {
            background: #fff;
            padding: 20px;
            border-radius: 5px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }
        input, select, textarea {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border: 1px solid #ccc;
            border-radius: 4px;
        }
        button {
            background-color: #5cb85c;
            color: white;
            padding: 10px;
            border: none;
            border-radius: 4px;
            cursor: pointer;
        }
        button:hover {
            background-color: #4cae4c;
        }
    </style>
</head>
<body>

<h2>فرم ثبت نام</h2>
<form action="/register/" method="POST">
    <label for="first_name">نام:</label>
    <input type="text" id="first_name" name="first_name" required>

    <label for="last_name">نام خانوادگی:</label>
    <input type="text" id="last_name" name="last_name" required>

    <label for="gender">جنسیت:</label>
    <select id="gender" name="gender" required>
        <option value="مرد">مرد</option>
        <option value="زن">زن</option>
        <option value="دیگر">دیگر</option>
    </select>

    <label for="age">سن:</label>
    <input type="number" id="age" name="age" min="1" required>

    <label for="city">شهر:</label>
    <input type="text" id="city" name="city" required>

    <label for="favorite_color">رنگ مورد علاقه:</label>
    <input type="text" id="favorite_color" name="favorite_color" required>

    <label for="birth_date">تاریخ تولد:</label>
    <input type="date" id="birth_date" name="birth_date" required>

    <label for="phone">شماره موبایل:</label>
    <input type="tel" id="phone" name="phone" pattern="[0-9]{10}" required placeholder="10 رقم بدون صفر اول">

    <label for="address">آدرس:</label>
    <textarea id="address" name="address" rows="4" required></textarea>

    <button type="submit">ثبت نام</button>
</form>

</body>
</html>
Mma123 Download HTML & CSS
I added a number of items to the desired.
<!DOCTYPE html>
<html>
<head>
    <title>FORM</title>
    <link rel="stylesheet" href="project.css" type="text/css">
</head>
<body>
    <form method="post">
        <table dir="rtl" style="width: 100%;">
            <thead>
            <tr>
                <th colspan="2">فرم ازمایشی</th>

            </tr>
        </thead>
        <tbody>
            <tr>
                <td><label>نام :</label></td>
                <td><input type="text" class="sd" name="name"></td>
            </tr>
            <tr>
                <td><lable>نام خانوادگی :</lable></td>
                <td><input type="text" class="sd" name="last_name"></td>
            </tr>

           <tr>
                <td> <label>کد ملی:</label></td>
                <td><input type="text" class="sd" name="code"></td>
            </tr>
            <tr>
                <td><lable>ایمیل:</lable></td>
                <td><input type="email" class="sd" required name="email"></td>
            </tr>
            <tr>
                <td><label>رمز عبور ایمیل :</label></td>
                <td><input type="password" class="sd" required name="pass"></td>

            </tr>
            <tr>
                <td><label>ادرس:</label></td>
                <td > <input type="text" class="sd" required name="address"></td>
            </tr>
            <tr>
                <td><lable>شماره تلفن:</lable></td>
                <td><input type="number" class="sd" required name="phone"> </td>
            </tr>

            <tr>
                <td><lable>سن:</lable></td>
                <td><input class="sd" type="number" name="age"></td>
            </tr>
            <tr>
                <td><label>جنسیت :</label></td>
                <td><input type="radio" name="gender">خانم
                    <input type="radio" name="gender">اقا
                    <input type="radio" name="gender">سایر
                </td>
            </tr>
            <tr>
                <td><label>رنگ مورد علاقه:</label></td>
                <td><input type="text" class="sd" name="color"></td>
            </tr>
            <tr>
                <td><lable>زبان انگلیسی بلدی:</lable></td>
                <td><input type="radio" name="en">بله
                    <input type="radio" name="en">خیر
                    <input type="radio" name="en">زیاد نه
                </td>
            </tr>
            <tr >
                <td></td>
                <td ><button type="submit" name="button">ثبت اطلاعات</button>
                </td>
            </tr>           
        </tbody>
        </table>
    </form>

</body>
</html>

<!--محتوای سی اس اس -->
@charset 'utf-8';
*{
    padding: 0px;
    margin: 0xp;
    font-style: italic;
    box-sizin
   g: border-box;
}

form {
    width: 400px;
    border: 2px solid rgb(0, 0, 0);
    margin: 100px auto;
    direction: rtl;
    border-radius: 30px;
    padding: 0px 5px; 
    font-size: large;
    background:linear-gradient(rgb(187, 164, 48) 20%,rgb(192, 150, 12) 20%,rgb(209, 176, 11),rgb(143, 133, 4));
}

table thead tr th {
    width: 100% ;
    padding: 10px 0px;
    background-color: black;
    color: white;
    border-radius:30px ;
}
input[type="radio"]{
    margin-left: 5px;
}

input[type="text"],input[type="email"],input[type="password"],input[type="number"]{
    width: 100%;
    padding: 4px;
    border-radius: 5px;
    border: 1px solid black;
    font-size: medium;
}

.sd:focus{
    box-shadow:  0px 0px 0px 4px  rgba(2, 0, 0, 0.2);
}

button {
    padding: 5px 10px;
    border-radius: 30px;
    border:1px solid rgb(149, 239, 166);
    background-color: rgb(149, 239, 166); ;
    color: black;
    font-size: larger;
    width: 50%;
}

button:hover{
    padding: 5px 10px;
    border-radius: 30px;
    border:1px solid rgb(5, 171, 36);
    color: black;
    background-color:rgb(5, 171, 36) ;
    font-size: larger;
    width: 50%;
}

name = input("nam khodra vared konid: ")
namekhanevadegi = input("nam khanevadegi khod ra vared konid: ")
jensiat = input("jensiat khodra vared konid: ")
sen = int(input("sen khod ra vared konid: "))
shomaretelephone = int(input("shomare telephone khod ra vared konid: "))
shahr = input("nam shahr khodra vared konid: ")
rangmoredalage = input("rang mored alage khodra vared konid: ")
addrese = input("addrese khod ra vared konid: ")
tarikhtavalod = input("tarikh tavalod khod ra vared konid: ")
print(name)
print(namekhanevadegi)
print(jensiat)
print(sen)
print(shomaretelephone)
print(shahr)
print(rangmoredalage)
print(addrese)
print(tarikhtavalod)
Nima123123 Download Python
<!DOCTYPE html>
<html lang="fa" >
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Register Form</title>
    <style>
        body{
            background-color: cadetblue;
        }
        .container{
            text-align: center;
        }
        .inp_first{
            margin-top: 30px;
            padding-top: 7px;
            padding-bottom: 7px;
            padding-left: 6px;
            padding-right: 140px;
            border-radius: 30px;
            margin-bottom: 25px;
        }
        .inp{
            padding-top: 7px;
            padding-bottom: 7px;
            padding-left: 6px;
            padding-right: 140px;
            border-radius: 30px;
            margin-bottom: 25px;
        }
        .inp_sec{
            margin-top: 30px;
            margin-bottom: 25px;
            padding-top: 7px;
            padding-bottom: 7px;
            padding-left: 6px;
            padding-right: 140px;
            border-radius: 30px;
        }
        .inp_r{
            margin-right: 20px;
        }
        .inp_co{
            margin-bottom: 25px;
        }
        .inp_su{
            padding-top: 7px;
            padding-bottom: 7px;
            padding-left: 6px;
            padding-right: 140px;
            border-radius: 30px;
            background-color: rgb(118, 172, 118);
        }
    </style>
</head>
<body>
    <form action="/register" method="post">
        <div class="container">
            <h3>register form</h3><br>
            <input type="text" class="inp_first" placeholder="Name"><br>
            <input type="text" class="inp" placeholder="Family"><br>
            <label for="radio_male">Male</label>
            <input type="radio" class="inp_r" name="gender">
            <label for="radio_female">Female</label>
            <input type="radio" class="inp_r" name="gender" ><br>
            <input type="text" class="inp_sec" placeholder="age"><br>
            <input type="text" class="inp" placeholder="City"><br>
            <label style="margin-right: 140px;">Favorite color</label>
            <input type="color" class="inp_co" name="fa_color"><br>
            <input type="date" class="inp" placeholder="brithday date"><br>
            <input type="text" class="inp" placeholder="Phone number"><br>
            <textarea name="address" class="inp" placeholder="address"></textarea><br>
            <input type="submit" class="inp_su" value="Register">
        </div>
    </form>
</body>
</html>
<!DOCTYPE html>
<html lang="fa" dir="rtl">
  <body>
    <form action="/register" method="post">
      <input type="text" id="name">
      <label for="name">نام</label><br><br>
      <input type="text" id="lname">
      <label for="fname">نام خانوادگی</label><br><br>
      <input type="radio" name="sex" id="man">
      <label for="man">مرد</label>
      <input type="radio" name="sex" id="woman">
      <label for="woman">زن</label><br><br>
      <input type="number" id="age">
      <label for="age">سن</label><br><br>
      <input type="text" id="city">
      <label for="city">شهر</label><br><br>
      <input type="text" id="color">
      <label for="color">رنگ مورد علاقه</label><br><br>
      <input type="date" id="birthday">
      <label for="birthday">تاریخ تولد</label><br><br>
      <input type="tel" id="telephone">
      <label for="telephone">شماره تلفن</label><br><br>
      <input type="text" id="addres">
      <label for="addres">آدرس</label><br><br><br>
      <input type="submit" value="فرستادن">

    </form>
  </body>
</html>

<< Previous page 1 2 Next page >>

Submit answer

Submitting answers is currently unavailable.

Related content

Detection using AI
×
×
Close