I am looking to append the submitted form data with the most recent form data on top. Before I added the CSS the form data was appending nicely in order but on the right side.I would like to append in the middle with the nice border. Here is the PHP and CSS. Now it appears somewhat in the center with the nice border, but the text appears on top on the previous submitted form text.
<?php
session_start();
?>
<!DOCTYPE html>
<html>
<head>
<title>Explore</title>
<link rel="stylesheet" href="http://yui.yahooapis.com/pure/0.6.0/pure-min.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link id="page_favicon" href="favicon.ico" rel="icon" type="image/x-icon" />
<!-- Optional theme -->
<link href="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2-rc.1/css/select2.min.css" rel="stylesheet" />
<script src="https://cdnjs.cloudflare.com/ajax/libs/select2/4.0.2-rc.1/js/select2.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap-theme.min.css">
<link rel="stylesheet" href="index.css">
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
<script src="https://maps.googleapis.com/maps/api/js"></script>
<script type="text/javascript" src="ddslick.js"></script>
<script type="text/javascript" src="http://dl.dropbox.com/u/40036711/Scripts/ddslick.js"></script>
<script type="text/javascript" src="searchlist/src/jquery-customselect.js"> </script>
<link rel="stylesheet" type="text/css" href="searchlist/src/jquery-customselect.css">
<script src="http://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
<script type="text/javascript" src="timeago.js"></script>
<!-- GOOGLE API IMPORTANT -->
<link rel="stylesheet" href="main.css">
</head>
<body>
<ol class="breadcrumb" style="position: fixed; width:100%; z-index: 1000;">
<li> <span class="glyphicon glyphicon-home" aria-hidden="true"></span> Home</li>
<li><span class="glyphicon glyphicon-credit-card" aria-hidden="true"></span> Hokie Passport</li>
<li> <span class="glyphicon glyphicon-picture" aria-hidden="true"></span> Photos</li>
<li><span class="glyphicon glyphicon-globe" aria-hidden="true"></span> Weather</li>
</ol>
<div id="allContent" >
<div id="formData" >
<input class="button-warning pure-button" style ="position: fixed; bottom: 0px;"title="Clear page content"type="submit" name="clear" id="clearbtn" value="Clear">
<?php
#FOR THE DRIVERS ONLY
if (!isset($_SESSION['inputs'])) {
// initialize the saved input session variable the first time
$_SESSION['inputs'] = array();
}
if (isset($_POST['name']) || isset($_POST['nameTwo'])) {
array_push($_SESSION['inputs'], $_POST);
}
foreach (array_reverse($_SESSION['inputs']) as $input) {
if(isset($input['desiredNum']))
{
echo " <span class='trip'> <p class='driverAlert' > DRIVER </p> <img src='taxi.png' width ='50' height='50'title='driver'> {$input['name']}, Age: {$input['age']} <br> To: {$input['arriveLoc']} - From: {$input['departLoc']}<br>
Leaves: {$input['departDate']} Returns: {$input['returnDate']} <br> Will drive up to: {$input['desiredNum']} people
<br> Contact # {$input['email']} <br> <br> </span>
";
}
else
{
echo " <span class='trip'> <p class='riderAlert' > PASSENGER </p> <img src='rider.png' width ='50' height='50'title='rider'> {$input['nameTwo']}, Age: {$input['ageTwo']} <br> Would like to go to {$input['departLocTwo']} from {$input['arriveLocTwo']} on {$input['departDateTwo']} and return on
{$input['returnDateTwo']} <br> Contact # {$input['emailTwo']} <br> <br></span>
";
}
}
?>
</div>
<!-- States selector -->
<div id="rider">
<input class="button-success pure-button" type="button" id="riderbtn"value="Passenger"> <br>
<form action="vt.php" id="riderForm" method="post" class="form-inline">
<div class="form-group">
<input required type="text" class="form-control input-sm" required id="nameTwo" name="nameTwo" placeholder="Enter Name" autocomplete="off">
</div><br> <br>
<div class="form-group">
<input type="text" class="form-control input-sm" id="ageTwo" required name="ageTwo" placeholder="Enter Age" autocomplete="off">
</div> <br> <br>
<div class="form-group">
<input type="text" class="form-control input-sm" id="departLocTwo" required name="departLocTwo" autocomplete="off" placeholder="Departure Location">
</div><br> <br>
<div class="form-group">
<input type="text" class="form-control input-sm" id="arriveLocTwo" required name="arriveLocTwo" autocomplete="off"placeholder="Destination Location">
</div><br> <br>
<div class="form-group">
<input type="date" class="form-control input-sm" id="departDateTwo" required name="departDateTwo" autocomplete="off" placeholder="Depart Date">
</div><br> <br>
<div class="form-group">
<input type="date" class="form-control input-sm" id="returnDateTwo" required name="returnDateTwo" autocomplete="off" placeholder="Return Date">
</div> <br> <br>
<div class="form-group">
<input type="email" class="form-control input-sm" id="emailTwo" required name="emailTwo" autocomplete="off" placeholder="Email">
</div><br> <br>
<input class="btn btn-default" type="submit" value="Submit" onclick="submitRider();">
</form>
</div>
<div id="driver">
<input type="button" class="button-success pure-button" id="driverbtn"value="Driver">
<form action="vt.php" id="driverForm" method="post" class="form-inline">
<select class="form-control" id="desiredNum" name="desiredNum">
<option disabled>How many people may you drive?</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
<option>11</option>
</select>
<br> <br>
<div class="form-group">
<input required type="text" class="form-control " id="name" required name="name" autocomplete="off" placeholder="Enter Name">
</div><br> <br>
<div class="form-group">
<input type="text" class="form-control " id="age" name="age" required autocomplete="off" placeholder="Enter Age">
</div> <br> <br>
<div class="form-group">
<input type="text" class="form-control " id="depart" name="departLoc" required autocomplete="off" placeholder="Departure Location">
</div><br> <br>
<div class="form-group">
<input type="text" class="form-control " id="arrive" name="arriveLoc" required autocomplete="off"placeholder="Destination Location">
</div><br> <br>
<div class="form-group">
<input type="date" class="form-control " id="departDate" name="departDate" required autocomplete="off"placeholder="Depart Date">
</div><br> <br>
<div class="form-group">
<input type="date" class="form-control " id="returnDate" name="returnDate" autocomplete="off" required placeholder="Return Date">
</div> <br> <br>
<div class="form-group">
<input type="email" class="form-control " id="email" required name="email" autocomplete="off" placeholder="Email">
</div><br> <br>
<input class="btn btn-default" type="submit" value="Submit" onclick="submitDriver();">
</form>
</div>
</div>
</body>
<script type="text/javascript">
$('#driverbtn').click(function()
{
$('#driverForm').toggle();
});
$('#riderbtn').click(function()
{
$('#riderForm').toggle();
});
$('#clearbtn').click(function()
{
$.post('clear.php', function()
{window.location = window.location.href;});
});
</script>
<script type="text/javascript">
$(document).ready( function(){
$('#states').ddslick();
});
</script>
<!--- End of rider data -->
</html>
.driverAlert
{
color: green;
}
.riderAlert
{
color:red;
}
body
{
background-color: white;
}
#allContent div
{
width: 33%;
position: relative;
float: left;
}
body
{
overflow-y: scroll;
}
#riderForm
{
display: none;
}
#driverForm
{
display: none;
}
#driverbtn
{
margin-top: 20px;
margin-bottom: 22px;
}
#riderbtn
{
margin-top: 20px;
margin-bottom: 22px;
}
#rider
{
position: fixed;
right: -450px;
}
#driver
{
position: fixed;
right: -200px;
}
#options
{
text-align: center;
}
.trip{
position: fixed;
top: 250px;
right:250px;
display: inline-block;
padding: 16px;
margin: 10px 0;
max-width: 468px;
border: #ddd 1px solid;
border-top-color: #eee;
border-bottom-color: #bbb;
border-radius: 5px;
box-shadow: 0 1px 3px rgba(0,0,0,0.15);
font: bold 14px/18px Helvetica, Arial, sans-serif;
color: #000;
}
Related
I want to save data depending on the option selected on the select menu, its option has a certain percentage attached to it, i tried using the code below but its only saving one value irregardless of which option is selected.
I have tried to use conditional-field by Steven Wanderski, but its only saving one value in all selections
my index.php
<?php
require_once('config.php');
require_once('function.php');
?>
<!DOCTYPE html>
<html>
<head>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<script src="js/conditional-field.min.js"></script>
</head>
<body>
<div class="container mt-3">
<form role="form" method="post" action="process.php">
<?php $grant="20";
$direct_cost="100";
$discounts="100";
$overhead_costs="70";
?>
<p class="h4 mb-4">Supplier Spends</p>
<div class="form-row mb-4">
<div class="col">
<label for="prog_description">Name of the Programme:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="prog_description" name="prog_description" class="form-control" placeholder="enter name of the programme embarked on" required>
</div>
</div>
<label for="type_of_contrib">Type of Contribution:</label><span style="color: red !important; display: inl`enter code here`ine; float: none;">*</span>
<select name="type_of_contrib" id="TypeOfContribution" class="TypeOfContribution form-control mb-4" required>
<option value="">--select type of contribution--</option>
<option value="Grant Contribution">Grant Contribution</option>
<option value="Direct cost incurred">Direct cost incurred</option>
<option value="discounts"> Discounts</option>
<option value="Overheads costs">Overheads costs</option>
<option value="Standard Loan">Standard Loan</option>
<option value="Lower Interest Rate">Lower Interest Rate</option>
<option value="Guarantees Provided">Guarantees Provided</option>
<option value="Minority Investment">Minority Investment</option>
<option value="Services at no Cost">Services at no Cost</option>
<option value="Services at a Discount">Services at a Discount</option>
<option value="Time of Employees">Time of Employees</option>
<option value="Shorter payment periods">Shorter payment periods</option>
<option value="Investment with lower Dividend">Investment with lower Dividend</option>
</select>
<div class="benefit form-row mb-4 ">
<div class="col">
<label for="Grant Contribution">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor" class="form-control" placeholder="benefit factor" value="<?php echo $grant;?>" readonly="readonly" required>
</div>
</div>
<div class="benefit2 form-row mb-4">
<div class="col">
<label for="Direct cost incurred">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor" class="form-control" placeholder="benefit factor" value="<?php echo $direct_cost;?>" readonly="readonly" required>
</div>
</div>
<div class="benefit3 form-row mb-4">
<div class="col">
<label for="Discounts">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor"class="form-control" placeholder="benefit factor" value="<?php echo $discounts;?>" readonly="readonly" required>
</div>
</div>
<div class="benefit4 form-row mb-4">
<div class="col">
<label for="Overheads costs">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor"class="form-control" placeholder="benefit factor" value="<?php echo $overhead_costs;?>" readonly="readonly" required>
</div>
</div>
<div class="benefit5 form-row mb-4">
<div class="col">
<label for="Standard Loan">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor"class="form-control" placeholder="benefit factor" value="70" readonly="readonly" required>
</div>
</div>
<div class="benefit6 form-row mb-4">
<div class="col">
<label for="Lower Interest Rate">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor"class="form-control" placeholder="benefit factor" value="50" readonly="readonly" required>
</div>
</div>
<div class="benefit7 form-row mb-4">
<div class="col">
<label for="Guarantees Provided">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor" class="form-control" placeholder="benefit factor" value="3" readonly="readonly" required>
</div>
</div>
<div class="benefit8 form-row mb-4">
<div class="col">
<label for="Minority Investment">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor"class="form-control" placeholder="benefit factor" value="70" readonly="readonly" required>
</div>
</div>
<div class="benefit9 form-row mb-4">
<div class="col">
<label for="Services at no Cost">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor" class="form-control" placeholder="benefit factor" value="60" readonly="readonly" required>
</div>
</div>
<div class="benefit10 form-row mb-4">
<div class="col">
<label for="Services at a Discount">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor" class="form-control" placeholder="benefit factor" value="60" readonly="readonly" required>
</div>
</div>
<div class="benefit11 form-row mb-4">
<div class="col">
<label for="Time of Employees">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor" class="form-control" placeholder="benefit factor" value="60" readonly="readonly" required>
</div>
</div>
<div class="benefit12 form-row mb-4" value="100";>
<div class="col">
<label for="shorter payment periods">Benefit Factor:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="text" id="benefit_factor" name="benefit_factor" class="form-control" placeholder="benefit factor" value="15" readonly="readonly" required>
</div>
</div>
<label for="budgeted_spend">Budgeted Spend:</label>
<input type="number" id="budgeted_spend" name="budgeted_spend" class="form-control mb-4" placeholder="Budgeted Spend" required>
<label for="actual_amount">Actual Amount Spent:</label><span style="color: red !important; display: inline; float: none;">*</span>
<input type="number" id="actual_amount" name="actual_amount" class="form-control mb-4" placeholder="Actual Amount Spent" required>
<label for="current_status">Status of the programme:</label><span style="color: red !important; display: inline; float: none;">*</span>
<select name="current_status" id="current_status" class="status form-control mb-4" required>
<option disabled selected>--select current status--</option>
<option value="started">started</option>
<option value="in_progress">in-progress</option>
<option value="completed">completed</option>
<option value="cancelled">cancelled</option>
</select>
<label for="anticipated_completion">Anticipated Completion Date:</label>
<input type="date" id="anticipated_completion" name="anticipated_completion" class="form-control mb-4" required>
<button class="btn btn-info my-4 btn-block" type="submit">Save Data</button>
</form>
<br>
<?php
get_all_records();
?>
</div>
<script>
$(document).ready(function(){
new ConditionalField({
control: '.TypeOfContribution',
visibility: {
'Grant Contribution': '.benefit',
'Direct cost incurred': '.benefit2',
'discounts': '.benefit3',
'Overheads costs': '.benefit4',
'Standard Loan': '.benefit5',
'Lower Interest Rate': '.benefit6',
'Guarantees Provided': '.benefit7',
'Minority Investment': '.benefit8',
'Services at no Cost': '.benefit9',
'Services at a Discount': '.benefit10',
'Time of Employees': '.benefit11',
'Shorter payment periods': '.benefit12',
}
});
});
</script>
?>
<?php
include "dbconfig.php";
session_start();
if (isset($_SESSION["session_admin"])=="" || $_SESSION["session_admin"]=="") {
header("location:index.php");
}
?>
<!DOCTYPE html>
<html>
<head>
<title>Edit</title>
<link rel="stylesheet" type="text/css" href="styles.css">
<link rel="stylesheet" type="text/css" href="bootstrap.css">
<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-glyphicons.css" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<style type="text/css">
.form-control
{
width: 300px;
/*text-transform: uppercase;*/
}
.email
{
/*ext-transform: lowercase;*/
}
.btn
{
color: white;
}
.error{
color: red;
}
.right-addon input { padding-right: 0px; }
.right-addon .glyphicon { right: 0px;}
</style>
</head>
<script type="text/javascript">
</script>
<body>
<div class="container">
<div class="panel panel-info">
<div class="panel-heading">
<center><strong><h2>Edit</h2></strong></center>
</div>
<div class="panel-body">
<?php
$get_id=$_GET["id"];
$result=mysqli_query($db,"select * from signup where sid=$get_id");
while ($row=mysqli_fetch_array($result)) {
?>
<form method="post" id="signup" role="form">
<div class="row">
<div class="form-group col-xs-7">
<div class="inner-addon left-addon">
<span class="glyphicon glyphicon-user"></span>
<input type="text" class="form-control" name="fullname" placeholder="Fullname" value=<?php echo $row["sfullname"]; ?>>
</div>
</div>
<div class="form-group col-xs-3">
<div class="inner-addon left-addon">
<span class="glyphicon glyphicon-envelope"></span>
<input type="text" class="form-control email" name="email" placeholder="Email address">
</div>
</div>
<div class="form-group col-xs-7">
<div class="inner-addon left-addon">
<span class="glyphicon glyphicon-earphone"></span>
<input type="text" class="form-control" name="mobile" placeholder="Mobile number">
</div>
</div>
<div class="form-group col-xs-3">
<div class="inner-addon left-addon">
<input type="date" class="form-control" name="dob">
</div>
</div>
<div class="form-group col-xs-7">
<div class="inner-addon left-addon">
<span class="glyphicon glyphicon-map-marker"></span>
<input type="text" class="form-control" name="address" placeholder="Address">
</div>
</div>
<div class="form-group col-xs-3">
<select class="form-control" name="state" style="width: 100px;" >
<option value="">State</option>
<option>Gujrat</option>
<option>Maharashtra</option>
<option>Goa</option>
<option>Rajasthan</option>
</select>
</div>
<div class="form-group col-xs-7">
<div class="inner-addon right-addon">
<input type="password" id="password" class="form-control" name="createpass" placeholder="Create password">
</div>
</div>
<div class="form-group col-xs-3">
<select class="form-control" name="city" style="width: 100px;" >
<option value="">City</option>
<option>Ahmedabad</option>
<option>Mumbai</option>
<option>Kolkata</option>
<option>Delhi</option>
<option>Banglore</option>
<option>Chennai </option>
</select>
</div>
<div class="form-group col-xs-7">
<div class="inner-addon right-addon">
<input type="password" class="form-control" name="confirmpass" placeholder="Confirm password">
</div>
</div>
<div class="form-group col-xs-3">
<strong>Gender</strong>
<input type="radio" name="gender" value="Male">Male
<input type="radio" name="gender" value="Female">Female
</div>
</div>
<div class="form-group ">
<center>
<!-- <input type="submit" name="sbt" value="Register" class="form-control btn-success"> -->
<button type="submit" name="sbt" class="btn"><span style="color: white;">Update</span></button>
</center>
</div>
</form>
<?php }?>
</div>
</div>
<!-- Jquery Plugin CDN -->
<script src="http://code.jquery.com/jquery-3.3.1.min.js" integrity="sha256-FgpCb/KJQlLNfOu91ta32o/NMZxltwRo8QtmkMRdAu8=" crossorigin="anonymous"></script>
<!-- Jquery Validation Plugin CDn -->
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/jquery-validation#1.17.0/dist/jquery.validate.js"></script>
<!-- Linking Page to index.js for form validation -->
<script type="text/javascript" src="index.js"></script>
</body>
</html>
I want to display wholw string from my database into textbox but I am only able to display first word of that string. How can I display the whole string?
I have attached 2 images for reference, please look at them. In my database there is "abc xyz" in sfullname column and when I am selecting it only "abc" is displaying in the textbox...please refer images Please look this Database table
I want to display wholw string from my database into textbox but I am only able to display first word of that string. How can I display the whole string?
I have attached 2 images for reference, please look at them. In my database there is "abc xyz" in sfullname column and when I am selecting it only "abc" is displaying in the textbox...please refer images Please look this Database table
In your first input look here:
value=<?php echo $row["sfullname"]; ?>
Your value attribute is unquoted. Any spaces will result in the output you describe. Besides, it should be html-escaped as well, as a stray quote in the data will result in the same behavior.
Fix by quoting correctly:
value="<?php echo htmlspecialchars($row["sfullname"], ENT_QUOTES); ?>"
While I am here. empty() fits better for your if statement, so you probably want something more like:
if (empty($_SESSION["session_admin"])) {
header("location:index.php");
exit;
}
Don't forget to exit after a header redirection, else the rest of your code is executed.
Plus mandatory nag about using prepared queries - else you are open to SQL injection.
You are missing double quotes in the value attributes, your code looks like:
<input type="text" class="form-control" name="fullname" placeholder="Fullname" value=<?php echo $row["sfullname"]; ?>>
Plese try below one instead of your code:
<input type="text" class="form-control" name="fullname" placeholder="Fullname" value="<?php echo $row["sfullname"]; ?>">
I have a PHP that validates if a input is empty if it is an error message is displayed e.g Email required, I am using Bootstrap for my form. Originally the message is displayed under the input (which I don't want).
Code im currently using:
<label>Number Of Rooms: </label>
<input type="number" class="form-control input-sm" max="10" name="Rooms" value="<?php echo $RoomErr;?>">
<span class="error">* <br><?php echo $RoomErr;?></span>
here is the link to the website website
I want to display the error message inside the text input i tried assigning the error to the value of the input:
<label>Number Of Rooms: </label>
<input type="number" class="form-control input-sm error" max="10" name="Rooms" value="<?php echo $RoomErr;?>">
The following does not work.
My CSS just assigns the error to color red
.error{
color:red;
}
I can't find much stuff about this.
You can try like this, because it is working as a placeholder.
<input type="number" class="form-control input-sm error" max="10" name="Rooms" placeholder="<?php echo $RoomErr;?>">
Please try this. I am using position:absolute; And manage this
label {
display: inline-block;
margin-left: 20px;
width: 135px;
}
.error {
color: red;
}
.form-group .error {
left: 165px;
position: absolute;
top: 5px;
}
.form-group{position:relative;}
.form-inline .form-control{display: inline-block;
vertical-align: middle;
width: auto;}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">
<div class="col-md-9">
<div class="container-form">
<p><span class="error">* required field.</span></p>
<form id="EmailForm" class="form-horizontal" action="" method="post">
<div class="form-inline">
<div class="form-group" style="position: relative;">
<label for="first_name">Name: </label>
<input class="form-control input-sm" name="first_name" type="text">
<span class="error">*Name is required</span>
</div>
</div>
<div class="form-inline">
<div class="form-group">
<label for="last_name">SurnameName: </label>
<input class="form-control input-sm" name="last_name" type="text">
<span class="error">*</span>
</div>
</div>
<div class="form-inline">
<div class="form-group">
<label for="email">Email: </label>
<input class="form-control input-sm" name="email" type="text">
<span class="error">* Email is required</span>
</div>
</div>
<div class="form-inline">
<div class="form-group">
<label>Number Of Rooms: </label>
<input class="form-control input-sm" max="10" name="Rooms" value="Mininum number of Hours : 3" type="number">
<span class="error">* Mininum number of Hours : 3</span>
</div>
</div>
<div class="form-inline">
<div class="form-group">
<label> Number hours: </label>
<input class="form-control input-sm" min="3" name="Hours" type="number">
<span class="error">* Mininum number of Hours : 3</span>
</div>
</div>
<div class="form-inline">
<div class="form-group">
<label for="description">Description of the House: </label>
<textarea name="description" rows="auto" class="form-control input-sm" cols="55"></textarea>
<span class="error">* Description is required</span>
</div>
</div>
<div class="form-inline">
<div class="form-group">
<div class="radio" style="margin-left:70px">
<input name="ironing" id="radiobtn" value="Yes" type="radio">
Yes
</div>
<div class="radio">
<input name="ironing" id="radiobtn" value="No" type="radio">
No
</div>
<span class="error">* Ironing is Required</span>
<span class="help-block" style="margin-left:50px">Would Like Ironing?</span>
</div>
</div>
<input class="btn btn-info btn-lg" name="submit" value="Submit" type="submit">
</form>
</div>
</div>
I've tried to implement the blur attribute to the image but it just blurs the body. I'm not sure how to make display it right. Thanks!
Here is the website.
http://79.170.44.80/sicuandomain.com/
Here is the html, and style, php code
<?php
$bg = array('Abstract.jpg', 'Antelope.jpg', 'Bahamas.jpg', 'Beach.jpg' ); // array of filenames
$i = rand(0, count($bg)-1);
$selectedBg = "$bg[$i]"; // set variable equal to which random filename was chosen
?>
<!DOCTYPE html>
<html>
<head>
<title>My Contact Form</title>
<link rel="stylesheet" href="css/bootstrap.min.css" type="text/css">
<link rel="stylesheet" href="css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<style type="text/css">
body{
content:"";
background: url(images/<?php echo $selectedBg; ?>) no-repeat;
background-size: cover;
z-index: -999;
-webkit-filter: blur(5px);
-moz-filter: blur(5px);
-o-filter: blur(5px);
-ms-filter: blur(5px);
filter: blur(5px);
}
</style>
</head>
<body>
<div class="container">
<div class="row">
<div class="col-lg-6">
<form id="form" action="welcome.php" class="form-horizontal" method="POST">
<h1 class="">My Contact Form</h1>
<div class="form-group">
<div class="col-lg-4">
<input type="text" placeholder="First Name" name="fname" class="form-control" pattern="[A-Z][a-zA-Z]*"required/>
</div>
<div class="col-lg-4">
<input type="text" placeholder="Last Name" name="lname" class="form-control" required/>
</div>
</div>
<div class="form-group">
<div class="col-lg-8">
<input type="email" placeholder="Email Address" name="email" class="form-control" required/>
</div>
</div>
<div class="form-group">
<div class="col-lg-8">
<input type="text" placeholder="Mobile" name="mobile" class="form-control" required/>
</div>
</div>
<div class="form-group">
<div class="col-lg-8">
<select name="gender" class="form-control" required>
<option value="">Select one</option>
<option value="Male">Male</option>
<option value="Female">Female</option>
<option value="Others">I'm not sure</option>
</select>
</div>
</div>
<div class="form-group">
<div class>
</div>
<div class="form group">
<div class="col-lg-offset-2 col-lg-6">
<button type="submit" class="btn btn-success pull-right">
<i class="fa fa-plus"></i> Add
</button>
</div>
</div>
</form>
</div>
</div>
</div>
<script src="js/bootstrap.min.js" type="text/javascript"></script>
<script src="js/jquery-1.11.3.min.js.css" type="text/javascript"></script>
</body>
</html>
try this.
demo fiddle http://jsfiddle.net/jLGFp/3/
div {
position: absolute;
left:0;
top: 0;
}
p {
position: absolute;
left:0;
top: 0;
}
So I have an e-newsletter popup on my website so users can stay in contact and up to date with our happenings. I only want the popup to appear on the homepage and i've put together a simple shorthand conditional statement like so:
<?php if(Mage::getSingleton('cms/page')->getPageId() == '2' && Mage::app()->getFrontController()->getRequest()->getRouteName() == 'cms') : ?>
<div id="newsletter_sign_up" style="display:none;" >
<div style="padding:20px;" >
<form action="<?php echo($this->getUrl('newsletter/subscriber/new')) ?>" method="post" >
<div class="fieldset">
<h1 style="color: #28ced7; text-align: left; font-family: Arial, Helvetica, sans-serif; font-size: 28px;">verbiage goes here</h1>
<h2 class="legend" style="text-align:left; font-family: Arial, Helvetica, sans-serif; font-size: 13px;">verbiage goes here</h2>
<!--end-->
<ul class="form-list">
<li class="fields">
<div class="customer-name">
<div class="field name-firstname">
<label class="required" for="firstname" style="text-align:left;"><em>*</em>First Name</label>
<div class="input-box">
<input type="text" class="input-text required-entry" maxlength="255" title="First Name" value="" name="firstname" id="firstname" autocomplete="off"/>
</div>
</div>
<div class="field name-lastname">
<label class="required" for="lastname" style="text-align:left;"><em>*</em>Last Name</label>
<div class="input-box">
<input type="text" class="input-text required-entry" maxlength="255" title="Last Name" value="" name="lastname" id="lastname" autocomplete="off"/>
</div>
</div>
</div>
</li>
<li>
<label class="required" for="email_address" style="text-align:left;"><em>*</em>Email Address</label>
<div class="input-box">
<input type="text" class="input-text validate-email required-entry" title="Email Address" value="" id="email_address" name="email" autocomplete="off"/>
<input class="pop_newsletter_source" name="source" type="hidden" value="3" />
</div>
</li>
</ul>
</div>
<div class="buttons-set form-buttons">
<button onclick="pop_newsletter.submit(); return false;" title="Submit" class="button" type="submit" autocomplete="off" style="position: relative; right: 140px;"><span><span>Submit</span></span></button>
</div>
<p class="required">* Required Fields</p>
<h2 style="text-align: left; font-size: 10px;">Email Privacy Statement:</h2>
<p style="font-family: Arial, Helvetica, sans-serif; font-size: 10px; text-align: left;">more verbiage</p>
<!--//end-->
</form>
</div>
</div>
<?php endif; ?>
I've checked to verify that the page id is 2.
<?php echo "<pre>"; print_r(Mage::getSingleton('cms/page')->getPageId()); echo "</pre>"; ?>
I can't figure out why it breaks... am i missing something blatantly obvious? Any help would be appreciated.