PluginProbe
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder / 3.3.1
Bit Form – Contact Form, Payment Forms, Multi Step Forms, Calculator & Custom Form Builder v3.3.1
3.3.1 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 All 138 releases
← All changes | views/preview-page.php +10 -0 3.1.03.3.1 View file →
@@ -58,8 +58,13 @@
58 58
59 59 if (isset($bfGlobals) && '' !== $bfGlobals) {
60 60 wp_add_inline_script('bitform-preview-' . $formIdSafe, (string) $bfGlobals, 'before');
61 61 }
62 +wp_add_inline_script(
63 + 'bitform-preview-' . $formIdSafe,
64 + 'if(!window.__bfShowPickerBound){window.__bfShowPickerBound=true;document.addEventListener("click",function(e){var t=e.target;if(t&&t.matches&&t.matches("input[data-bf-show-picker=\"1\"]")&&typeof t.showPicker==="function"){try{t.showPicker();}catch(_){}}});}',
65 + 'after'
66 +);
62 67
63 68 $jsSize = bitforms_readable_filesize(filesize(BITFORMS_CONTENT_DIR . '/form-scripts/preview-' . $formID . '.js'));
64 69 $cssSize = bitforms_readable_filesize(filesize(BITFORMS_CONTENT_DIR . '/form-styles/bitform-' . $formID . '.css'));
65 70 $shortcode = '[bitform id="' . $formID . '"]';
@@ -528,8 +533,13 @@
528 533
529 534 <!-- Preview Container -->
530 535 <main class="bf-preview-container">
531 536 <div class="bf-preview-frame" id="bf-preview-frame">
537 + <?php
538 + // Fallback config for when an optimizer defers or drops the inline script.
539 + // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped -- built by buildFormConfigTag(), JSON_HEX_* escaped.
540 + echo isset($configTag) ? $configTag : '';
541 + ?>
532 542 <?php echo wp_kses($formHTML, EscapingHelper::getFormAllowedHtml(isset($formContent) ? $formContent : null)); ?>
533 543 </div>
534 544 </main>
535 545