survey_seahorse

Software Engineering Project - Fall 2018
Log | Files | Refs | README

commit a73a99c9ac0ee28245aec292d4428f4278572758
parent a37b6d5a6014e40941ebe3071838e619f1ff9cdb
Author: John Kubach <johnkubach@gmail.com>
Date:   Wed, 19 Dec 2018 16:56:47 -0500

input update

change the input method for getting the number of questions. add min limit of 1 and max limit of 10.

Diffstat:
Mwebsite/createsurvey.php | 25+++++++++++++++----------
1 file changed, 15 insertions(+), 10 deletions(-)

diff --git a/website/createsurvey.php b/website/createsurvey.php @@ -1,11 +1,12 @@ <?php include 'res/navbar.php'; session_start(); - if(!isset($_SESSION['uid'])){ - header("location: login.php?user=notloggedin"); - exit; - } - ?> +if(!isset($_SESSION['uid'])){ + header("location: login.php?user=notloggedin"); + exit; +} +?> + <html> <!-- <link rel="stylesheet" href="res/style.css"> --> <h2> Create A New Survey </h2> @@ -16,20 +17,24 @@ session_start(); <input type="text" name="description" placeholder="This is a great survey"> <br> <p> Answer Type </p> - <input type="radio" name="type" value="00"> Numeric (1 - 10) <br> + <input type="radio" checked="checked" name="type" value="00"> Numeric (1 - 10) <br> <input type="radio" name="type" value="01"> Yes / No <br> <!-- <input type="radio" name="type" value="10"> Text <br> --> +<!-- <input type="radio" name="type" value="11"> Custom <br> --> -<p> Number of Questions </p> -<input type="text" name="number" placeholder="5"> <br> +<p> Number of Questions (1-10)</p> +<input type="number" name="number" placeholder="5" min="1" max="10"> <br> <p> Expiration Date </p> -<input type="date" name="expire"> <br> +<?php +$next_week = date("Y-m-d", strtotime("+1 week")); +echo "<input type='date' value = '$next_week' name='expire'> <br>"; +?> <p> Can a user take this survey more than once? </p> <input type="radio" name="once" value="0" checked> Yes <br> <input type="radio" name="once" value="1"> No <br> <button type="submit" name="submit">Create Survey</button> - + </form> </html>