PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 2.10.2
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v2.10.2
V-3.3.0 3.2.2 3.2.1 3.2.0 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 V3.0.3 V3.0.2 -3.0.1 V_3.0.0 1.1.1 1.1.8 1.2 1.3 1.4 1.4.18 1.5.2 1.9 2.0 2.10.0 2.10.1 2.10.2 All 137 releases
bit-form / views / preview-page.php

preview-page.php in Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder 2.10.2, at views/preview-page.php

77 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <!DOCTYPE html>
2 <html lang="en">
3
4 <head>
5 <meta charset="UTF-8">
6 <meta http-equiv="X-UA-Compatible" content="IE=edge">
7 <meta name="viewport" content="width=device-width, initial-scale=1.0">
8 <title><?php echo isset($title) ? $title : ''; ?></title>
9 <style>
10 html,
11 body {
12 min-height: 100%;
13 }
14
15 body {
16 display: flex;
17 justify-content: center;
18 align-items: center;
19 flex-direction: column;
20 /* background-color: #f1f1f1; */
21 }
22
23 ._frm-bg-b<?php echo $formID;
24
25 ?> {
26 width: 600px;
27 margin-block: 100px;
28 }
29 </style>
30 <?php
31 $formUpdateVersion = get_option('bit-form_form_update_version');
32 ?>
33 <link rel="stylesheet" href="<?=BITFORMS_UPLOAD_BASE_URL?>/form-styles/bitform-<?=$formID?>.css?bfv=<?=$formUpdateVersion?>" />
34 <?php
35 $customCssSubPath = '/form-styles/bitform-custom-' . $formID . '.css';
36 ?>
37 <?php if(file_exists(BITFORMS_CONTENT_DIR . $customCssSubPath)) : ?>
38 <link rel="stylesheet" href="<?php echo BITFORMS_UPLOAD_BASE_URL . $customCssSubPath ?>" />
39 <?php endif; ?>
40
41 <?php if (isset($font) && '' !== $font): ?>
42 <link rel="preconnect" href="https://fonts.googleapis.com">
43 <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
44 <link rel="stylesheet" href="<?php echo $font?>" />
45 <?php endif; ?>
46
47 </head>
48
49 <body>
50 <?php echo $formHTML?>
51
52 <script>
53 <?php echo $bfGlobals?>;
54 </script>
55 <script src="<?=BITFORMS_UPLOAD_BASE_URL?>/form-scripts/preview-<?=$formID?>.js?bfv=<?=$formUpdateVersion?>"></script>
56
57
58 <div style="position:fixed;top:0;left:0;border:1px solid lightgray;background:#fafafa;padding:10px">
59 <?php
60 function readable_filesize($bytes, $decimals = 2)
61 {
62 $sz = 'BKMGTP';
63 $factor = floor((strlen($bytes) - 1) / 3);
64 return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . ' ' . @$sz[$factor];
65 }
66 ?>
67 <div>Form ID : <?php echo isset($formID) ? $formID : ''; ?></div>
68 <div>JS size =
69 <?php echo readable_filesize(filesize(BITFORMS_CONTENT_DIR . '/form-scripts/preview-' . $formID . '.js')); ?>
70 </div>
71 <div>CSS size =
72 <?php echo readable_filesize(filesize(BITFORMS_CONTENT_DIR . '/form-styles/bitform-' . $formID . '.css')); ?>
73 </div>
74 </div>
75 </body>
76
77 </html>