Skip to content

Commit

Permalink
Update form_view.php
Browse files Browse the repository at this point in the history
  • Loading branch information
yigitkerem committed Jan 26, 2021
1 parent ff90fa9 commit ae12c3e
Showing 1 changed file with 19 additions and 8 deletions.
27 changes: 19 additions & 8 deletions views/form_view.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,14 @@ function render_form($form_id){
<head>
<title><?php echo $form_object->getFormName(); ?></title>
<?php link_std_inputs(); ?>
<link href="<?php the_fileurl("static/css/form.css?version=1"); ?>" rel="stylesheet" type="text/css">
<link href="<?php the_fileurl("static/css/form.css?version=3"); ?>" rel="stylesheet" type="text/css">
<script src="<?php the_fileurl("static/js/jquery.min.js"); ?>" ></script>
<script src="<?php the_fileurl("static/js/forge.min.js"); ?>"></script>
<script src="<?php the_fileurl("static/js/sweetalert.min.js"); ?>"></script>
<script src="<?php the_fileurl("static/js/form.js?version=1"); ?>"></script>
<script src="<?php the_fileurl("static/js/form.js?version=3"); ?>"></script>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Oxygen:wght@300;400;700&display=swap" rel="stylesheet">

<script>
var current_form_id = "";
var publicEncryptionKey = "";
Expand Down Expand Up @@ -85,15 +88,15 @@ function render_form($form_id){
</textarea>
<textarea id="aes_key" hidden></textarea>
<textarea id="aes_iv" hidden></textarea>
<div class="form-title-container">
<h1 class="form-title-hdg"><?php echo $form_object->getFormName(); ?></h1>
</div>
<?php

if(trim($form_object->getLongMeta("FormDisclaimer")) != ""){

?>
<div class="form-wrapper" id="form-disclaimer">
<div class="form-wrapper" id="form-disclaimer" style="font-family: Oxygen;">
<div class="form-title-container">
<h1 class="form-title-hdg"><?php echo $form_object->getFormName(); ?></h1>
</div>
<?php echo $form_object->getLongMeta("FormDisclaimer"); ?>

<div style="margin-top: 30px;">
Expand All @@ -105,6 +108,10 @@ function render_form($form_id){
}
?>
<div class="form-wrapper <?php echo $disclaimerClass; ?>" id="form-wrapper">
<div class="form-title-container">
<h1 class="form-title-hdg"><?php echo $form_object->getFormName(); ?></h1>
<div class="form-description"><?php echo $form_object->getLongMeta("FormDescription"); ?></div>
</div>
<?php
foreach ($currentFormFields as $formFieldID) {

Expand All @@ -125,14 +132,14 @@ function render_form($form_id){

case "textarea":
?>
<label id='<?php echo $formFieldID; ?>-label' for='<?php echo $formFieldID; ?>-previewinput' class="std-label"><?php echo $formField->field_name; ?></label>
<label id='<?php echo $formFieldID; ?>-label' for='<?php echo $formFieldID; ?>-previewinput' class="std-label <?php if($formField->isRequired()){ echo "required-label"; } ?>"><?php echo $formField->field_name; ?></label>
<textarea class="std-textarea formfield <?php $formField->getRequiredClassName(); ?>" id="<?php echo $formFieldID; ?>-input"></textarea>
<?php
break;

case "dropdown":
?>
<label id='<?php echo $formFieldID; ?>-previewlabel' for='<?php echo $formFieldID; ?>-previewinput' class="std-label"><?php echo $formField->field_name; ?></label>
<label id='<?php echo $formFieldID; ?>-previewlabel' for='<?php echo $formFieldID; ?>-previewinput' class="std-label <?php if($formField->isRequired()){ echo "required-label"; } ?>"><?php echo $formField->field_name; ?></label>
<select id="<?php echo $formFieldID; ?>-previewinput" class="std-select formfield <?php $formField->getRequiredClassName(); ?>">
<?php

Expand Down Expand Up @@ -166,6 +173,10 @@ function render_form($form_id){
<div id="responded" style="display: none;">
<h2 style="font-family: sans-serif, 'Roboto'; ">Your response was saved.</h2>
</div>

<div class="form-footer">
<img class="footer-logo" src="<?php the_fileurl("static/img/SecureFormsLogo.png"); ?>">
</div>
</body>
</html>
<?php
Expand Down

0 comments on commit ae12c3e

Please sign in to comment.