2024-07-22 09:49:37 +00:00
|
|
|
<!DOCTYPE html>
|
|
|
|
<html lang="en">
|
|
|
|
<head>
|
|
|
|
<meta charset="UTF-8">
|
|
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
<title>Form Preview - Google Forms</title>
|
|
|
|
<link rel="stylesheet" href="https://bootswatch.com/3/flatly/bootstrap.min.css">
|
2024-07-23 12:54:27 +00:00
|
|
|
<link rel="stylesheet" href="<?php echo base_url(); ?>assets/css/form_preview.css">
|
|
|
|
|
2024-07-22 09:49:37 +00:00
|
|
|
</head>
|
|
|
|
<body>
|
2024-07-26 12:41:46 +00:00
|
|
|
<style>
|
|
|
|
|
|
|
|
.container { /* Or another parent element */
|
|
|
|
position: relative; /* Create a positioning context */
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn-success {
|
|
|
|
position: relative;
|
|
|
|
left: 250px;
|
|
|
|
top: -10px;
|
|
|
|
margin-bottom: 20px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.form-header {
|
|
|
|
/* position: absolute; */
|
|
|
|
left: 13px;
|
|
|
|
text-align: left;
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
2024-07-19 10:46:18 +00:00
|
|
|
<div class="container">
|
|
|
|
<div class="form-header">
|
|
|
|
<h2><?php echo $form->title; ?></h2>
|
2024-07-23 12:54:27 +00:00
|
|
|
<br>
|
2024-07-19 10:46:18 +00:00
|
|
|
<h4><?php echo $form->description; ?></h4>
|
|
|
|
</div>
|
2024-08-09 12:04:48 +00:00
|
|
|
<?php foreach ($questions as $question) : ?>
|
2024-07-19 10:46:18 +00:00
|
|
|
<div class="form-section">
|
|
|
|
<div class="question-section">
|
2024-07-23 12:54:27 +00:00
|
|
|
<p class="question-label"><?php echo $question->text; ?></p>
|
2024-07-19 10:46:18 +00:00
|
|
|
</div>
|
|
|
|
|
2024-08-09 12:04:48 +00:00
|
|
|
<?php if ($question->type == 'multiple-choice') : ?>
|
2024-07-19 10:46:18 +00:00
|
|
|
<div class="options-container">
|
2024-08-09 12:04:48 +00:00
|
|
|
<?php foreach ($question->options as $option) : ?>
|
2024-07-19 10:46:18 +00:00
|
|
|
<div class="option">
|
|
|
|
<input type="radio" name="option-<?php echo $question->id; ?>" disabled>
|
|
|
|
<label><?php echo $option->option_text; ?></label>
|
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
2024-08-09 12:04:48 +00:00
|
|
|
<?php elseif ($question->type == 'checkboxes') : ?>
|
2024-07-19 10:46:18 +00:00
|
|
|
<div class="options-container">
|
2024-08-09 12:04:48 +00:00
|
|
|
<?php foreach ($question->options as $option) : ?>
|
2024-07-19 10:46:18 +00:00
|
|
|
<div class="option">
|
|
|
|
<input type="checkbox" name="option-<?php echo $question->id; ?>" disabled>
|
|
|
|
<label><?php echo $option->option_text; ?></label>
|
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</div>
|
2024-08-09 12:04:48 +00:00
|
|
|
<?php elseif ($question->type == 'short-answer') : ?>
|
2024-07-19 10:46:18 +00:00
|
|
|
<div class="options-container">
|
|
|
|
<input type="text" class="form-control" placeholder="Short answer text" disabled>
|
|
|
|
</div>
|
2024-08-09 12:04:48 +00:00
|
|
|
<?php elseif ($question->type == 'paragraph') : ?>
|
2024-07-19 10:46:18 +00:00
|
|
|
<div class="options-container">
|
|
|
|
<textarea class="form-control" placeholder="Paragraph text" disabled></textarea>
|
|
|
|
</div>
|
2024-08-09 12:04:48 +00:00
|
|
|
<?php elseif ($question->type == 'dropdown') : ?>
|
2024-07-19 10:46:18 +00:00
|
|
|
<div class="options-container">
|
|
|
|
<select class="form-control" disabled>
|
2024-08-09 12:04:48 +00:00
|
|
|
<?php foreach ($question->options as $option) : ?>
|
2024-07-19 10:46:18 +00:00
|
|
|
<option><?php echo $option->option_text; ?></option>
|
|
|
|
<?php endforeach; ?>
|
|
|
|
</select>
|
|
|
|
</div>
|
|
|
|
<?php endif; ?>
|
|
|
|
</div>
|
|
|
|
<?php endforeach; ?>
|
2024-07-23 12:54:27 +00:00
|
|
|
<a href="<?php echo base_url('published_forms'); ?>" class="btn btn-success">Back</a>
|
|
|
|
<br>
|
2024-07-19 10:46:18 +00:00
|
|
|
</div>
|
2024-07-22 09:49:37 +00:00
|
|
|
</body>
|
|
|
|
</html>
|