Skip to content

Commit d5303b3

Browse files
Merge pull request #152 from RiyaGupta89/survey-form
Survey form
2 parents e983277 + 2ec6da4 commit d5303b3

File tree

9 files changed

+548
-0
lines changed

9 files changed

+548
-0
lines changed

SURVEY FORM/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

SURVEY FORM/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Welcome 🖐 to the SURVEY FORM
2+
It is a simple Survey Form. We can use this form to take feedback from the customers and use it for the betterment.
3+
4+
5+
## 💻Tech Stack
6+
<br>
7+
8+
![HTML](https://img.shields.io/badge/html5%20-%23E34F26.svg?&style=for-the-badge&logo=html5&logoColor=white)
9+
![CSS](https://img.shields.io/badge/css3%20-%231572B6.svg?&style=for-the-badge&logo=css3&logoColor=white)
10+
![JS](https://img.shields.io/badge/javascript%20-%23323330.svg?&style=for-the-badge&logo=javascript&logoColor=%23F7DF1E)
11+
12+
<br>
13+
14+
15+
### How to get the form on your local machine:
16+
17+
---
18+
19+
- Download or clone the repository
20+
21+
```
22+
git clone https://github.com/Ayushparikh-code/Web-dev-mini-projects.git
23+
```
24+
25+
- Go to the directory
26+
- Open Survey Form folder
27+
- Open the terminal and run
28+
```
29+
node app.js
30+
```
31+
- Open *localhost:3000* in your browser.
32+
33+
***
34+
###Remember:
35+
If you are using node then you need to reload your server everytime you make changes in your file. Otherwise if you have nodemon installed, you can use nodemon.
36+
***
37+
38+
<br>
39+
40+
##Screenshots
41+
42+
![Demo1](public/images/survey-demo1.png)
43+
<br>
44+
45+
![Demo2](public/images/survey-demo2.png)
46+
<br>
47+
48+
49+
## Happy Coding!

SURVEY FORM/app.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const express = require("express");
2+
3+
const app = express();
4+
5+
app.use(express.static("public"));
6+
7+
app.get("/", function(req, res) {
8+
res.sendFile(__dirname + "/index.html");
9+
});
10+
11+
app.post("/", (req, res) => {
12+
res.send("<h1> Thankyou for filling up this feedback form. Go back to the previous page =) </h1>");
13+
})
14+
15+
app.listen(3000, function() {
16+
console.log("Server started running on port 3000");
17+
})

SURVEY FORM/index.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<link rel="stylesheet" type="text/css" href="css/style.css">
7+
<title>Survey Form</title>
8+
</head>
9+
<body>
10+
<h1>Please fill this Survey-Form.</h1>
11+
12+
<form method="POST">
13+
<div>
14+
<label for="name"><b>Name:</b></label>
15+
<input type="text" placeholder="Enter your name" name="name" required>
16+
17+
<label for="email"><b>Email:</b></label>
18+
<input type="email" placeholder="Enter your Email" name="email" required>
19+
20+
<label for="tel"><b>Phone Number:</b></label>
21+
<input type="number" placeholder="Enter your Phone Number" name="phoneNumber" required>
22+
23+
<label><b>How likely is that you would recommend Pizza Ghar to a family member or a friend?</b></label>
24+
<label>Definately</label>
25+
<input type="radio" name="same" name="recommendation">
26+
<label>Maybe</label>
27+
<input type="radio" name="same" name="recommendation">
28+
<label>Not Sure</label>
29+
<input type="radio" name="same" name="recommendation">
30+
31+
<label><b>What do you like most in our Pizzas?</b></label>
32+
<textarea name="" id="" cols="30" rows="5"></textarea>
33+
34+
<button type="submit" class="btn">Submit</button>
35+
</div>
36+
</form>
37+
38+
</body>
39+
</html>

0 commit comments

Comments
 (0)