Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <fieldset>
- <!-- Form Name -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
- <script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.3/jquery.min.js"></script>
- <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
- <style type="text/css">
- /*progressbar*/
- #progressbar {
- margin-bottom: 30px;
- overflow: hidden;
- /*CSS counters to number the steps*/
- counter-reset: step;
- }
- #progressbar li {
- list-style-type: none;
- color: white;
- text-transform: uppercase;
- font-size: 9px;
- width: 33.33%;
- float: left;
- position: relative;
- }
- #progressbar li:before {
- content: counter(step);
- counter-increment: step;
- width: 20px;
- line-height: 20px;
- display: block;
- font-size: 10px;
- color: #333;
- background: white;
- border-radius: 3px;
- margin: 0 auto 5px auto;
- }
- /*progressbar connectors*/
- #progressbar li:after {
- content: '';
- width: 100%;
- height: 2px;
- background: white;
- position: absolute;
- left: -50%;
- top: 9px;
- z-index: -1; /*put it behind the numbers*/
- }
- #progressbar li:first-child:after {
- /*connector not needed before the first step*/
- content: none;
- }
- /*marking active/completed steps green*/
- /*The number of the step and the connector before it = green*/
- #progressbar li.active:before, #progressbar li.active:after{
- background: #27AE60;
- color: white;
- }
- #v_form fieldset:not(:first-of-type) {
- display: none;
- }
- </style>
- <!-- Text input-->
- <h2>Personal Information</h2>
- <div class="form-row">
- <div class="form-group col-md-5">
- <label for="fname" class="col-form-label"><strong>Firstname</strong></label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-2">
- <label for="mi" class="col-form-label"><strong>M.I</strong></label>
- <input id="mi" name="mi" placeholder="" class="form-control input-md" type="text">
- </div>
- <div class="form-group col-md-5">
- <label for="lname" class="col-form-label"><strong>Lastname</strong></label>
- <input id="lname" name="lname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- </div>
- <div class="form-inline">
- <div class="form-group col-md-1"></div>
- <div class="form-group col-md-4">
- <label for="age"><strong>Age</strong></label>
- <input id="age" name="age" placeholder="" class="form-control input-md" type="text">
- </div>
- <div class="form-group col-md-6">
- <label for="age"><strong>Sex</strong></label>
- <label class="radio-inline"><input name="sex" id="radios-0" value="1" checked="checked" type="radio">Male</label>
- <label class="radio-inline"><input name="sex" id="radios-1" value="2" type="radio">Female</label>
- </div>
- </div>
- <div class="form-row">
- <div class="form-group col-md-8">
- <label for="email" class="col-form-label"><strong>Email</strong></label>
- <input id="email" name="email" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-4">
- <label for="tel" class="col-form-label"><strong>Contact No.</strong></label>
- <input id="tel" name="tel" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- </div>
- <div class="form-row">
- <div class="form-group col-md-8">
- <label for="company" class="col-form-label"><strong>Company Name</strong></label>
- <input id="company" name="company" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-4">
- <label for="lname" class="col-form-label"><strong>Category</strong></label>
- <select class="form-control" id="exampleFormControlSelect1">
- <option>Manufacturer</option>
- <option>Trader</option>
- <option>Distributor</option>
- <option>Drugstore/Retail Outlets</option>
- </select>
- </div>
- </div>
- <input type="button" name="next" class="next btn btn-info" value="Next" />
- </fieldset>
- <fieldset>
- <h2>Promptness</h2>
- <div class="form-row">
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">Did the inspector arrive <mark>(within reasonable hours)</mark> on time for the inspection (Indicate the time of arrival of the inspector)?</label>
- <div class="radio">
- <label><input type="radio" name="optradio">Greater than one (1) hour before the scheduled time</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">Thirty (30) minutes before the scheduled time</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">Right on time</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">Fifteen (15) minutes before the scheduled time</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">Thirty (30) minutes late</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">Greater than one (1) hour late</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">Other:</label>
- </div>
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">12. The inspection was conducted in a timely manner (Timeliness)</label>
- <div class="radio">
- <label><input type="radio" name="optradio">1 Poor</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">2</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">3</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">4</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">5 Excellent</label>
- </div>
- </div>
- </div>
- <input type="button" name="previous" class="previous btn btn-default" value="Previous" />
- <input type="button" name="next" class="next btn btn-info" value="Next" />
- </fieldset>
- <fieldset>
- <h2>Adherence to Professional Standards of Conduct/Manner/Politeness</h2>
- <div class="form-row">
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">13. The Inspector was efficient and was able to finish the inspection within a reasonable time</label>
- <div class="radio">
- <label><input type="radio" name="optradio">1 Poor</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">2</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">3</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">4</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">5 Excellent</label>
- </div>
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">14. Is the Inspector courteous?</label>
- <div class="radio">
- <label><input type="radio" name="optradio">1 Poor</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">2</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">3</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">4</label>
- </div>
- <div class="radio">
- <label><input type="radio" name="optradio">5 Excellent</label>
- </div>
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">15. Is the Inspector neat/ in proper uniform? Otherwise, please state your observation</label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">16. Is the Inspector tactful in pointing out critical issues in inspection?</label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">17. Is the Inspector honest and/ or truthful in answering your inquiry or clarification?</label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">18. Did the inspector presented proper identification ID before the conduct of inspection?</label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">19. Is the Inspector fair in his/her recommendations or preparation of reports? If not, cite situations demonstrating otherwise:</label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">20. Did the Inspector discussed the findings of inspection during the exit meeting and provided the summary of report?</label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">21. The inspection was conducted in a fair and objective manner.</label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-12">
- <label for="fname" class="col-form-label">22. The Inspector was as unobtrusive and noninterfering as possible to the pharmacy’s routine activities. (Helpfulness)</label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- </div>
- <input type="button" name="previous" class="previous btn btn-default" value="Previous" />
- <input type="button" name="next" class="next btn btn-info" value="Next" />
- </fieldset>
- <fieldset>
- <h2>Knowledge and Expertise</h2>
- <div class="form-row">
- <div class="form-group col-md-5">
- <label for="fname" class="col-form-label"><strong>Firstname</strong></label>
- <input id="fname" name="fname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- <div class="form-group col-md-2">
- <label for="mi" class="col-form-label"><strong>M.I</strong></label>
- <input id="mi" name="mi" placeholder="" class="form-control input-md" type="text">
- </div>
- <div class="form-group col-md-5">
- <label for="lname" class="col-form-label"><strong>Lastname</strong></label>
- <input id="lname" name="lname" placeholder="" class="form-control input-md" required="" type="text">
- </div>
- </div>
- <input type="button" name="previous" class="previous btn btn-default" value="Previous" />
- <input class="btn btn-success" type="submit" name="submit_form" value="submit" />
- </fieldset>
- </form>
- <script>
- $(document).ready(function(){
- var current = 1,current_step,next_step,steps;
- steps = $("fieldset").length;
- $(".next").click(function(){
- current_step = $(this).parent();
- next_step = $(this).parent().next();
- next_step.show();
- current_step.hide();
- setProgressBar(++current);
- $("#progressbar li").eq($("fieldset").index(next_fs)).addClass("active");
- });
- $(".previous").click(function(){
- current_step = $(this).parent();
- next_step = $(this).parent().prev();
- next_step.show();
- current_step.hide();
- setProgressBar(--current);
- });
- setProgressBar(current);
- // Change progress bar action
- function setProgressBar(curStep){
- var percent = parseFloat(100 / steps) * curStep;
- percent = percent.toFixed();
- $(".progress-bar")
- .css("width",percent+"%")
- .html(percent+"%");
- }
- });
- </script>
- <?php
- $html = ob_get_clean();
- // does the inserting, in case the form is filled and submitted
- if ( isset( $_POST["submit_form"] ) && $_POST["fname"] != "" ) {
- $table = $wpdb->prefix."my_table";
- $fname = strip_tags($_POST["fname"], "");
- $mi = strip_tags($_POST["mi"], "");
- $lname = strip_tags($_POST["lname"], "");
- $phone = strip_tags($_POST["phone"], "");
- $email = strip_tags($_POST["email"], "");
- $sex = strip_tags($_POST["sex"], "");
- $age = strip_tags($_POST["age"], "");
- $wpdb->insert(
- $table,
- array(
- 'fname' => $fname,
- 'mi' => $mi,
- 'lname' => $lname,
- 'phone' => $phone,
- 'email' => $email,
- 'sex' => $sex,
- 'age' => $age
- )
- );
- $html = "<p>Your concern <strong>$fname</strong> was successfully submitted. Thanks!!</p>";
- }
- // if the form is submitted but the name is empty
- if ( isset( $_POST["submit_form"] ) && $_POST["fname"] == "" )
- $html .= "<p>You need to fill the required fields.</p>";
- // outputs everything
- return $html;
- }
- // adds a shortcode you can use: [insert-into-db]
- add_shortcode('elh-db-insert', 'elh_insert_into_db');
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement