| 1 |
<?php |
| 2 |
if (!defined('ABSPATH') && !defined('BITFORMS_ASSET_URI')) { |
| 3 |
exit; |
| 4 |
} |
| 5 |
?> |
| 6 |
|
| 7 |
<!DOCTYPE html> |
| 8 |
<html lang="en"> |
| 9 |
|
| 10 |
<head> |
| 11 |
<meta charset="UTF-8"> |
| 12 |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> |
| 13 |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 14 |
<title><?php echo isset($title) ? esc_html($title) : ''; ?></title> |
| 15 |
<style> |
| 16 |
* { |
| 17 |
padding: 0; |
| 18 |
margin: 0; |
| 19 |
box-sizing: border-box; |
| 20 |
} |
| 21 |
|
| 22 |
.standalone-form-container { |
| 23 |
min-height: 100vh; |
| 24 |
display: flex; |
| 25 |
justify-content: center; |
| 26 |
align-items: center; |
| 27 |
} |
| 28 |
|
| 29 |
.standalone-form-wrapper { |
| 30 |
width: 40%; |
| 31 |
/* Additional styling for the container, if needed */ |
| 32 |
} |
| 33 |
|
| 34 |
@media (max-width: 575.98px) { |
| 35 |
.standalone-form-wrapper { |
| 36 |
width: 100%; |
| 37 |
} |
| 38 |
} |
| 39 |
|
| 40 |
._frm-bg-b<?php echo esc_html($formID); |
| 41 |
|
| 42 |
?> { |
| 43 |
width: 100%; |
| 44 |
} |
| 45 |
</style> |
| 46 |
<?php |
| 47 |
$baseCSSPath = "/form-styles/bitform-{$formID}.css"; |
| 48 |
$customCSSPath = "/form-styles/bitform-custom-{$formID}.css"; |
| 49 |
$standaloneCSSPath = "/form-styles/bitform-standalone-{$formID}.css"; |
| 50 |
?> |
| 51 |
<link rel="stylesheet" href="<?php echo esc_url(BITFORMS_UPLOAD_BASE_URL . $baseCSSPath)?>" /> |
| 52 |
|
| 53 |
<?php if (file_exists(BITFORMS_CONTENT_DIR . $customCSSPath)) : ?> |
| 54 |
<link rel="stylesheet" href="<?php echo esc_url(BITFORMS_UPLOAD_BASE_URL . $customCSSPath) ?>" /> |
| 55 |
<?php endif; ?> |
| 56 |
|
| 57 |
<?php if (file_exists(BITFORMS_CONTENT_DIR . $standaloneCSSPath)) : ?> |
| 58 |
<link rel="stylesheet" href="<?php echo esc_url(BITFORMS_UPLOAD_BASE_URL . $standaloneCSSPath) ?>" /> |
| 59 |
<?php endif; ?> |
| 60 |
|
| 61 |
<?php if (isset($font) && '' !== $font) : ?> |
| 62 |
<link rel="preconnect" href="https://fonts.googleapis.com"> |
| 63 |
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> |
| 64 |
<link rel="stylesheet" href="<?php echo esc_url($font) ?>" /> |
| 65 |
<?php endif; ?> |
| 66 |
|
| 67 |
</head> |
| 68 |
|
| 69 |
<body> |
| 70 |
<div class="standalone-form-container"> |
| 71 |
<div class="standalone-form-wrapper"> |
| 72 |
<?php echo $formHTML ?> |
| 73 |
</div> |
| 74 |
</div> |
| 75 |
|
| 76 |
<script> |
| 77 |
<?php echo $bfGlobals ?>; |
| 78 |
<?php |
| 79 |
$previewJsPath = BITFORMS_UPLOAD_BASE_URL . '/form-scripts/preview-' . $formID . '.js'; |
| 80 |
?> |
| 81 |
</script> |
| 82 |
<script src="<?php echo esc_url($previewJsPath) ?>"></script> |
| 83 |
</div> |
| 84 |
</body> |
| 85 |
|
| 86 |
</html> |