Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*
- * A Custom PHP Contact us page. Add or change form fields on line 56 and in the form itself.
- * Jquery is used to add/remove Bootstrap has-error class to invalid fields.
- */
- ini_set('display_errors', 1);
- ini_set('display_startup_errors', 1);
- error_reporting(E_ALL);
- /**
- * Get Error Class
- *
- * @return string;
- */
- $response = '';
- function getErrorClass($failedKeys, $key)
- {
- if(isset($failedKeys) && is_array($failedKeys) && in_array($key, $failedKeys))
- {
- return 'has-error';
- }
- return '';
- }
- // Get Previous Value
- function getPreviousValue($valueKey)
- {
- return isset($_POST) && !empty($_POST) && isset($_POST[$valueKey]) ? $_POST[$valueKey] : '';
- }
- function getCheckedAttribute($valueKey, $value)
- {
- return isset($_POST[$valueKey]) && in_array($value, $_POST[$valueKey]) ? 'checked' : '';
- }
- if(isset($_POST) && !empty($_POST))
- {
- // New Line Tag
- $nL = "<br />";
- // Fuction to generate response
- function my_contact_form_generate_response($type, $message)
- {
- global $response;
- if($type == "success")
- {
- $response = "<div class='success alert alert-success wow fadeIn' role='alert' id='success-message'> <i class='glyphicon glyphicon-thumbs-up'></i> {$message}</div>";
- }
- else
- {
- $response = "<div class='error alert alert-danger wow fadeIn' role='alert' id='error-message'><i class='glyphicon glyphicon-warning-sign'></i> {$message} </div>";
- }
- }
- // Response messages
- $missing_content = "Please supply all required information.";
- $email_invalid = "Email Address Invalid.";
- $message_unsent = "Message was not sent. Try Again.";
- $message_sent = "Thanks! Your Application has been sent. We will contact you if you meet our requirements";
- $customFailedMessage = 'Please fill out all required fields';
- // Define the fields we use, title => field name
- // This can be used to add fields into auto-validation below.
- $userVariables = [
- // Personal Info
- 'Personal_Info' => [
- 'Full Name' => 'full_name',
- 'Date of Birth' => 'dob',
- 'Email' => 'email',
- 'Phone' => 'phone',
- 'City' => 'city',
- 'State' => 'state',
- 'Zip Code' => 'zip',
- 'Graduated HS' => 'graduated',
- 'Date Graduated HS' => 'grad-date',
- 'College Attended' => 'college',
- 'Collected Unemployment' => [
- 'key' => 'unemployment',
- 'allowed' => ['Yes', 'No']
- ]
- ],
- // Application Info
- 'Application_Info' => [
- 'Vape Experience' => [
- 'key' => 'vape-experience',
- 'allowed' => ['None', 'Beginner', 'Intermediate', 'Expert']
- ],
- 'Job type' => [
- 'key' => 'job-type',
- 'allowed' => ['Full Time', 'Part Time']
- ],
- 'Available Hours' => [
- 'key' => 'avail-hours',
- 'allowed' => ['Weekends', 'Days', 'Nights']
- ],
- 'Total Hours Avail' => 'total-hours',
- 'Avail Hours Explained' => 'hours-exp',
- 'Avail Start Date' => 'start-date',
- 'Desired Hourly Rate' => 'salary',
- 'Drivers License' => [
- 'key' => 'license',
- 'allowed' => ['Yes', 'No']
- ],
- 'Has Own Transportation' => [
- 'key' => 'has-car',
- 'allowed' => ['Yes', 'No']
- ],
- 'Consent to Drug Test' => [
- 'key' => 'drug-test',
- 'allowed' => ['Yes', 'No']
- ],
- 'Want Employment Because' => 'why-work',
- 'Special Skills' => 'skills',
- 'Convicted of Crime' => [
- 'key' => 'conviction',
- 'allowed' => ['Yes', 'No']
- ],
- 'Conviction Explained' => 'conviction-explain'
- ],
- // Employement History
- 'Employment_History' => [
- // Employer 1
- 'Employer 1' => 'employer-1-name',
- 'Employer 1 Phone #' => 'employer-1-phone',
- 'Employer 1 Job Duties' => 'employer-1-duties',
- 'Employer 1 Supervisor' => 'employer-1-supervisor',
- 'Employer 1 Start Date' => 'job1-start-date',
- 'Employer 1 End Date' => 'job1-end-date',
- 'Employer 1 Reason for Leaving' => 'employer-1-reason',
- 'Employer 1 Contact Previous' => [
- 'key' => 'employer-1-contact',
- 'allowed' => ['Yes', 'No']
- ],
- // Employer 2
- 'Employer 2' => 'employer-2-name',
- 'Employer 2 Phone #' => 'employer-2-phone',
- 'Employer 2 Job Duties' => 'employer-2-duties',
- 'Employer 2 Supervisor' => 'employer-2-supervisor',
- 'Employer 2 Start Date' => 'job2-start-date',
- 'Employer 2 End Date' => 'job2-end-date',
- 'Employer 2 Reason for Leaving' => 'employer-2-reason',
- 'Employer 2 Contact Previous' => [
- 'key' => 'employer-2-contact',
- 'allowed' => ['Yes', 'No']
- ],
- // Employer 3
- 'Employer 3' => 'employer-3-name',
- 'Employer 3 Phone #' => 'employer-3-phone',
- 'Employer 3 Job Duties' => 'employer-3-duties',
- 'Employer 3 Supervisor' => 'employer-3-supervisor',
- 'Employer 3 Start Date' => 'job3-start-date',
- 'Employer 3 End Date' => 'job3-end-date',
- 'Employer 3 Reason for Leaving' => 'employer-3-reason',
- 'Employer 3 Contact Previous' => [
- 'key' => 'employer-3-contact',
- 'allowed' => ['Yes', 'No']
- ]
- ],
- ];// end of form fields
- // Instantiate variables for failed, successful validated fields
- $failedFields = [];
- $validFields = [];
- $failedKeys = [];
- // Loop through each variable defined above, and check it's validity as a non-blank string.
- // If successful, add it to the message array and strip all tags for security, and trim whitespace
- if(!empty($_POST))
- {
- foreach($userVariables as $section => $userVariableList)
- {
- foreach($userVariableList as $title => $userField)
- {
- if(is_array($userField))
- {
- if(isset($userField['key']) && $userField['key'] != '' && isset($userField['allowed']) && !empty($userField['allowed']))
- {
- $key = $userField['key'];
- if(!isset($_POST[$key]) || $_POST[$key] == '')
- {
- $failedFields[] = $title;
- $failedKeys[] = $key;
- }
- else
- {
- if(is_array($_POST[$key]))
- {
- $failValueArray = false;
- foreach($_POST[$key] as $value)
- {
- if(!in_array($value, $userField['allowed']))
- {
- $failValueArray = true;
- continue;
- }
- }
- if($failValueArray)
- {
- $failedFields[] = $title;
- $failedKeys[] = $key;
- }
- }
- else
- {
- $validFields[$section][$title] = trim(strip_tags(($_POST[$key])));
- }
- }
- }
- }
- else
- {
- // If our field did not pass validation, we push to failedFields array
- if(!isset($_POST[$userField]) || !is_string($_POST[$userField]) || $_POST[$userField] == '')
- {
- $failedFields[] = $title;
- $failedKeys[] = $userField;
- }
- // If successful, add this to validFields array and trim/clean the content
- else
- {
- $validFields[$section][$title] = trim(strip_tags(($_POST[$userField])));
- }
- }
- }
- }
- }
- // If we have > 0 failed fields, we will send a error response to the form
- if(!empty($failedFields))
- {
- // Concatenate message with failed fields in the message
- $failureMessage = isset($customFailedMessage) && $customFailedMessage !== '' ? $customFailedMessage : "The following fields are required: " . implode(', ', $failedFields);
- my_contact_form_generate_response("error", $failureMessage);
- }
- // Create HTML message
- $message = '<html><head>';
- // define the Google Font used in the message
- $message .='<style>@import url("https://fonts.googleapis.com/css?family=Open+Sans:400,600");</style>';
- $message .='</head>';
- $message .='<body style="font-family:Open Sans, sans-serif; font-weight:400;">';
- $message .= "<h3>Application for Employment with Vapers Choice</h3>";
- $message .= '<table rules="all" style="border-color: #666;" cellpadding="10" width="100%">';
- // If we have valid fields listed above, we will concatenate a message for the email body then close the table, body, and html tags
- if(!empty($validFields))
- {
- foreach($validFields as $section => $fields)
- {
- if(!empty($fields))
- {
- $message .= "<tr style='background: #cdcdcd; color: #333; font-family:Open Sans, sans-serif; font-weight:600;'><td colspan='2'>".str_replace('_', ' ', $section)."</td></tr>";
- foreach($fields as $title => $value)
- {
- $message .= "<tr style='background: #eee;'><td style='width:400px; font-family: Open Sans, sans-serif; margin: 0px; padding:8px; font-weight: 600;'>" . $title . ":</td><td style='font-family: Open Sans, sans-serif; margin: 0px; padding:8px; font-weight: 400;'>" . $value . "</td></tr>";
- }
- }
- }
- }
- $message .= '</table></body></html>';
- // end message
- echo $message;die();
- $uploadedFile = false;
- $movefile = false;
- $failedAttachment = false;
- if(isset($_FILES['attachmentFile']) && file_exists($_FILES['attachmentFile']['tmp_name']))
- {
- $uploadedFile = $_FILES['attachmentFile'];
- //Get the uploaded file information
- $name_of_uploaded_file = basename($uploadedFile['name']);
- //get the file extension of the file
- $type_of_uploaded_file = substr($name_of_uploaded_file, strrpos($name_of_uploaded_file, '.') + 1);
- $size_of_uploaded_file = $uploadedFile["size"] / 1024; //size in KBs
- //Settings
- $max_allowed_file_size = 2000; // size in KB
- $allowed_extensions = array("doc", "docx", "pdf");
- $upload_overrides = array( 'test_form' => false );
- //Validations
- if($size_of_uploaded_file > $max_allowed_file_size)
- {
- $failedKeys[] = 'attachmentFile';
- $failedFields[] = 'Uploaded File';
- $failedAttachment = true;
- my_contact_form_generate_response("error", "Size of uploaded file should be less than ". round($max_allowed_file_size / 1024). "mb ");
- }
- //------ Validate the file extension
- $allowed_ext = false;
- for($i = 0; $i <sizeof($allowed_extensions); $i++)
- {
- if(strcasecmp($allowed_extensions[$i], $type_of_uploaded_file) == 0)
- {
- $allowed_ext = true;
- }
- }
- if(!$allowed_ext)
- {
- $failedKeys[] = 'attachmentFile';
- $failedFields[] = 'Uploaded File';
- $failedAttachment = true;
- my_contact_form_generate_response("error", "The uploaded file is not supported file type. Only the following file types are supported: ".implode(', ',$allowed_extensions));
- }
- $movefile = $uploadedFile;
- }
- if(empty($failedFields) && !$failedAttachment && isset($_POST['gotcha']) )//&& $_POST['gotcha'] == '')
- {
- // Mailer variables
- $email = $_POST['email'];
- $to = "info@vaperschoiceusa.com";
- $fromName = $_POST['full_name'];
- $subject = "Job Application Submisssion - Vapers Choice";
- $attachment = !$failedAttachment ? $movefile : false;
- $tmpName = false;
- $uid = md5(uniqid(time()));
- $separator = md5(time());
- $eol = PHP_EOL;
- $nmessage = '';
- // main header (multipart mandatory)
- $header = "From: ".$fromName." <".$email.">\r\n";
- $header .= "Reply-To: ".$email."\r\n";
- $header .= "MIME-Version: 1.0\r\n";
- $header .= "Content-Type: multipart/mixed; boundary=\"".$uid."\"\r\n\r\n";
- $nmessage = "--".$uid."\r\n";
- $nmessage .= "Content-type:text/html; charset=iso-8859-1\r\n";
- $nmessage .= "Content-Transfer-Encoding: 7bit\r\n\r\n";
- $nmessage .= $message."\r\n\r\n";
- if($attachment)
- {
- $tmpName = $attachment['tmp_name'];
- $filename = preg_replace('/[^a-zA-Z0-9._-]/', '', $attachment['name']);
- $filetype = $attachment["type"];
- $filetemp = $attachment["tmp_name"];
- $filesize = filesize($tmpName);
- $handle = fopen($tmpName, "r");
- $content = fread($handle, $filesize);
- fclose($handle);
- $content = chunk_split(base64_encode($content));
- $nmessage .= "--".$uid."\r\n";
- $nmessage .= "Content-Type: application/octet-stream; name=\"".$filename."\"\r\n";
- $nmessage .= "Content-Transfer-Encoding: base64\r\n";
- $nmessage .= "Content-Disposition: attachment; filename=\"".$filename."\"\r\n\r\n";
- $nmessage .= $content."\r\n\r\n";
- $nmessage .= "--".$uid."--";
- }
- // Create the message and send, returning success variable
- $sent = mail($to, $subject, $nmessage, $header);
- // If successful, kick back success on form
- if($sent)
- {
- my_contact_form_generate_response("success", $message_sent);
- }
- // On failure, send error response back to the form
- else
- {
- my_contact_form_generate_response("error", $message_unsent);
- if($tmpName)
- {
- unlink($tmpName);
- }
- }
- }
- else if((isset($_POST['submitted']) && ($_POST['submitted']) || !empty($failedFields)) && !$failedAttachment)
- {
- my_contact_form_generate_response("error", 'Failure to Submit Form');
- }
- }
- ?>
- <!-- End Form Logic -->
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <meta name="description" content="Vapers Choice">
- <link rel="icon" href="../favicon.ico">
- <title>Vapers Choice</title>
- <link href="../css/bootstrap.min.css" rel="stylesheet">
- <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
- <link href="../css/animate.css" rel="stylesheet">
- <link href="../css/styles.css" rel="stylesheet">
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/2.0.0/jquery.min.js"></script>
- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
- </head>
- <body>
- <div id="main" class="clearfix wow fadeIn" role="main">
- <div id="content">
- <div class="container">
- <div class="row">
- <div class="col-sm-12">
- <div id="respond">
- <img src="../images/logo.png" alt="Vapers Choice logo" class="img-responsive logo-app">
- <form class="form-horizontal" action="" method="post" id="application_form" enctype="multipart/form-data">
- <fieldset>
- <legend class="text-center">Application For Employemnt with Vapers Choice</legend>
- <?php echo $response; ?>
- <div class="well">
- <p style="margin-bottom: 20px; text-align:center;">Please fill out the application form and we will get back to you ASAP!</p>
- <h4 class="section-title">Personal Information</h4><!-- /.section-title -->
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Full Name <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
- <input name="full_name" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('full_name') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Date of Birth <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
- <input name="dob" placeholder="" class="form-control" type="text" id="datepicker" value="<?php echo getPreviousValue('dob') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">E-Mail <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
- <input name="email" placeholder="" class="form-control" type="email" value="<?php echo getPreviousValue('email') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Phone # <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
- <input name="phone" placeholder="(855)555-1212" class="form-control" type="text" value="<?php echo getPreviousValue('phone') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Street Address <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span>
- <input name="street-address" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('street-address') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">City <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span>
- <input name="city" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('city') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">State <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span>
- <input name="state" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('state') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Zip Code <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-home"></i></span>
- <input name="zip" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('zip') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Graduated High School? <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="graduated" id="graduated-yes" value="Yes" required <?php echo getCheckedAttribute('graduated', 'Yes') ?>> Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="graduated" id="graduated-no" value="No" required <?php echo getCheckedAttribute('graduated', 'No') ?>> No
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Year Graduated</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
- <input name="grad-date" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('grad-date') ?>">
- </div><!-- /.col-sm-3 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">College</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-education"></i></span>
- <input name="college" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('college') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Have you collected unemployment in the last 60 days?<span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="unemployment" id="license-yes" value="Yes" required <?php echo getCheckedAttribute('unemployment', 'Yes') ?>> Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="unemployment" id="license-no" value="No" required <?php echo getCheckedAttribute('unemployment', 'No') ?>> No
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <!-- Section -->
- <div class="clearfix"></div><!-- /.clearfix -->
- <h4 class="section-title mt40">Application Information</h4><!-- /.section-title -->
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Vape Experience <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="vape-experience" id="none" value="None" required <?php echo getCheckedAttribute('vape-experience', 'None') ?>> None
- </label>
- <label class="radio-inline">
- <input type="radio" name="vape-experience" id="beginner" value="Beginner" required <?php echo getCheckedAttribute('vape-experience', 'Beginner') ?>> Beginner
- </label>
- <label class="radio-inline">
- <input type="radio" name="vape-experience" id="intermediate " value="Intermediate" required <?php echo getCheckedAttribute('vape-experience', 'Intermediate') ?>> Intermediate
- </label>
- <label class="radio-inline">
- <input type="radio" name="vape-experience" id="expert" value="Expert" required <?php echo getCheckedAttribute('vape-experience', 'Expert') ?>> Expert
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Job type <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="checkbox-inline">
- <input name="job-type[]" type="checkbox" id="full-time" value="Full Time" <?php echo getCheckedAttribute('job-type', 'Full Time') ?>> Full Time
- </label>
- <label class="checkbox-inline">
- <input name="job-type[]" type="checkbox" id="part-time" value="Part Time" <?php echo getCheckedAttribute('job-type', 'Part Time') ?>> Part Time
- </label>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Available Hours <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="checkbox-inline">
- <input name="avail-hours[]" type="checkbox" id="weekends" value="Weekends" <?php echo getCheckedAttribute('avail-hours', 'Weekends') ?>> Weekends
- </label>
- <label class="checkbox-inline">
- <input name="avail-hours[]" type="checkbox" id="days" value="Days" <?php echo getCheckedAttribute('avail-hours', 'Days') ?>> Days
- </label>
- <label class="checkbox-inline">
- <input name="avail-hours[]" type="checkbox" id="nights" value="Nights" <?php echo getCheckedAttribute('avail-hours', 'Nights') ?>> Nights
- </label>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Hours per week? <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span>
- <input name="total-hours" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('total-hours') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Hours Explained:</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-time"></i></span>
- <textarea class="form-control" name="hours-exp" required><?php echo getPreviousValue('hours-exp') ?></textarea>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Date you can start <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
- <input name="start-date" placeholder="" class="form-control" type="text" id="startdate" value="<?php echo getPreviousValue('start-date') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Desired hourly rate? <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-ice-lolly-tasted"></i></span>
- <input name="salary" placeholder="$/hr" class="form-control" type="text" value="<?php echo getPreviousValue('salary') ?>" required>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Do you have valid driver's license? <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="license" id="license-yes" value="Yes" required <?php echo getCheckedAttribute('license', 'Yes') ?>> Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="license" id="license-no" value="No" required <?php echo getCheckedAttribute('license', 'No') ?>> No
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Do you have you own transportation? <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="has-car" id="has-car-yes" value="Yes" required <?php echo getCheckedAttribute('has-car', 'Yes') ?>> Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="has-car" id="has-car-no" value="No" required <?php echo getCheckedAttribute('has-car', 'No') ?>> No
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Would you consent to pre-employment Drug Screening? <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="drug-test" id="drug-test-yes" value="Yes" required <?php echo getCheckedAttribute('drug-test', 'Yes') ?>> Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="drug-test" id="drug-test-no" value="No" required <?php echo getCheckedAttribute('drug-test', 'No') ?>> No
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Why do you want to work for us?</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
- <textarea class="form-control" name="why-work" required><?php echo getPreviousValue('why-work') ?></textarea>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Do you possess any special skills that may be an advantage as an employee?</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
- <textarea class="form-control" name="skills" required><?php echo getPreviousValue('skills') ?></textarea>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Have you been convicted of any crime? <small>(not including traffic or parking violations)</small>? <span class="required">*</span></label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="conviction" id="conviction-yes" value="Yes" required <?php echo getCheckedAttribute('conviction', 'Yes') ?>> Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="conviction" id="conviction-no" value="No" required <?php echo getCheckedAttribute('conviction', 'No') ?>> No
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">If Yes, please explain?</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
- <textarea class="form-control" name="conviction-explain" required><?php echo getPreviousValue('conviction-explain') ?></textarea>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <!-- Section --> <div class="clearfix"></div><!-- /.clearfix -->
- <h4 class="section-title mt40">Employment History</h4><!-- /.section-title -->
- <p>Last 3 Places of Employment (Provide all information requested accurately)</p>
- <!-- Employer 1--> <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Employer 1</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-briefcase"></i></span>
- <input name="employer-1-name" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-1-name') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Phone Number</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
- <input name="employer-1-phone" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-1-phone') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Duties</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
- <textarea class="form-control" name="employer-1-duties"><?php echo getPreviousValue('employer-1-duties') ?></textarea>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Supervisor</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
- <input name="employer-1-supervisor" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-1-supervisor') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Start Date</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
- <input name="job1-start-date" placeholder="" class="form-control" type="text" id="job1startdate" value="<?php echo getPreviousValue('job1-start-date') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">End Date</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
- <input name="job1-end-date" placeholder="" class="form-control" type="text" id="job1enddate" value="<?php echo getPreviousValue('job1-end-date') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Reason for leaving</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-flag"></i></span>
- <input name="employer-1-reason" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-1-reason') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">May we contact to verify employment?</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="employer-1-contact" id="employer-1-contact-yes" value="Yes" <?php echo getCheckedAttribute('employer-1-contact', 'Yes') ?>> Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="employer-1-contact" id="employer-1-contact-no" value="No" <?php echo getCheckedAttribute('employer-1-contact', 'No') ?>> No
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <hr>
- <!-- Employer 2--> <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Employer 2</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-briefcase"></i></span>
- <input name="employer-2-name" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-2-name') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Phone Number</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
- <input name="employer-2-phone" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-2-phone') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Duties</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
- <textarea class="form-control" name="employer-2-duties"><?php echo getPreviousValue('employer-2-duties') ?></textarea>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Supervisor</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
- <input name="employer-2-supervisor" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-2-supervisor') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Start Date</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
- <input name="job2-start-date" placeholder="" class="form-control" type="text" id="job2startdate" value="<?php echo getPreviousValue('job2-start-date') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">End Date</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
- <input name="job2-end-date" placeholder="" class="form-control" type="text" id="job2enddate" value="<?php echo getPreviousValue('job2-end-date') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Reason for leaving</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-flag"></i></span>
- <input name="employer-2-reason" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-2-reason') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">May we contact to verify employment?</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="employer-2-contact" id="employer-2-contact-yes" value="Yes" <?php echo getCheckedAttribute('employer-2-contact', 'Yes') ?>> Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="employer-2-contact" id="employer-2-contact-no" value="No" <?php echo getCheckedAttribute('employer-2-contact', 'No') ?>> No
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <hr>
- <!-- Employer 3--> <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Employer 3</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-briefcase"></i></span>
- <input name="employer-3-name" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-3-name') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Phone Number</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-earphone"></i></span>
- <input name="employer-3-phone" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-3-phone') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Duties</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-pencil"></i></span>
- <textarea class="form-control" name="employer-3-duties"><?php echo getPreviousValue('employer-3-duties') ?></textarea>
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Supervisor</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-user"></i></span>
- <input name="employer-3-supervisor" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-3-supervisor') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Start Date</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
- <input name="job3-start-date" placeholder="" class="form-control" type="text" id="job3startdate" value="<?php echo getPreviousValue('job3-start-date') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">End Date</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-3">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-calendar"></i></span>
- <input name="job3-end-date" placeholder="" class="form-control" type="text" id="job3enddate" value="<?php echo getPreviousValue('job3-end-date') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">Reason for leaving</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <span class="input-group-addon"><i class="glyphicon glyphicon-flag"></i></span>
- <input name="employer-3-reason" placeholder="" class="form-control" type="text" value="<?php echo getPreviousValue('employer-3-reason') ?>">
- </div><!-- /.col-sm-7 -->
- </div>
- </div>
- <div class="form-group">
- <div class="col-sm-5">
- <label class="control-label">May we contact to verify employment?</label>
- </div><!-- /.col-sm-5 -->
- <div class="col-sm-7">
- <div class="input-group">
- <label class="radio-inline">
- <input type="radio" name="employer-3-contact" id="employer-3-contact-yes" value="Yes" <?php echo getCheckedAttribute('employer-3-contact', 'Yes') ?>> Yes
- </label>
- <label class="radio-inline">
- <input type="radio" name="employer-3-contact" id="employer-3-contact-no" value="No" <?php echo getCheckedAttribute('employer-3-contact', 'No') ?>> No
- </label>
- </div>
- </div><!-- /.col-sm-7 -->
- </div>
- <!-- Section --> <div class="clearfix"></div><!-- /.clearfix -->
- <h4 class="section-title mt40">Resume</h4><!-- /.section-title-->
- <p style="margin-bottom: 20px;">Please upload your resume in Pdf or Word format.</p>
- <input type="file" name="attachmentFile">
- <!-- Section --> <div class="clearfix"></div><!-- /.clearfix -->
- <h4 class="section-title mt40">Statement</h4><!-- /.section-title-->
- <p>By submitting your application for employemnt you hereby confirm that all the information listed in the application above, as well as on your resume is true and accurate. I understand that my employment is contingent on a thorough background and reference check.</p>
- <!--Anti-Spam Field-->
- <div class="form-group hidden" id="gotcha">
- <label class="control-label">Leave this field empty</label>
- <div class="input-group">
- <input name="gotcha" class="form-control" type="text">
- </div>
- </div>
- <div class="form-group hidden">
- <input type="hidden" name="submitted" value="1">
- </div>
- <!--Submit Button -->
- <div class="form-group">
- <button type="submit" class="btn btn-info">Send
- <span class="glyphicon glyphicon-send"></span>
- </button>
- </div>
- <script>
- // Add/Remove Bootstrap "has-error" class from invalid fields on key-up and blur
- jQuery('#application_form :input[required]').keyup(function ()
- {
- var formElement = jQuery(this);
- formGroup = formElement.closest('.form-group');
- if(formGroup.hasClass('has-error') && jQuery.trim(formElement.val()).length)
- {
- formGroup.removeClass('has-error');
- }
- });
- jQuery('#application_form :input[required]').blur(function ()
- {
- var formElement = jQuery(this);
- formGroup = formElement.closest('.form-group');
- if(jQuery.trim(formElement.val()).length==0)
- {
- formGroup.addClass('has-error');
- }
- });
- </script>
- </div><!-- /.well -->
- </fieldset>
- </form>
- </div><!--/.respond-->
- </div><!--/.col-->
- </div><!-- /.row-->
- </div><!-- /.container -->
- </div><!-- /content -->
- </div><!-- /main -->
- <!-- JavaScript-->
- <script src="../js/bootstrap.min.js"></script>
- <script src="../js/wow.js"></script>
- <script src="../js/form.js"></script>
- <script>
- $( function() {
- $( "#datepicker" ).datepicker({
- changeMonth: true,
- changeYear: true,
- yearRange: '1960:2001'
- });
- $( "#startdate" ).datepicker();
- $( "#job1startdate" ).datepicker();
- $( "#job1enddate" ).datepicker();
- $( "#job2startdate" ).datepicker();
- $( "#job2enddate" ).datepicker();
- $( "#job3startdate" ).datepicker();
- $( "#job3enddate" ).datepicker();
- });
- </script>
- </body>
- </html>
Add Comment
Please, Sign In to add comment