This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Shortcode to display field and label only if the field is not empty | |
| function jfb_display_if_not_empty($atts, $content = null) { | |
| // Define default attributes and merge with user-defined attributes | |
| $defaults = array( | |
| 'field' => '', // The field value to check | |
| 'label' => '', // The label text to display | |
| ); | |
| $atts = shortcode_atts($defaults, $atts); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* JetFormBuilder Success Messages Floating Toast - CENTERED */ | |
| .jet-form-builder-message { | |
| position: fixed !important; | |
| top: 50% !important; | |
| left: 50% !important; | |
| bottom: auto !important; | |
| right: auto !important; | |
| z-index: 999999 !important; | |
| background: #ffffff !important; | |
| padding: 16px 24px !important; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('admin_footer', function () { | |
| $screen = function_exists('get_current_screen') ? get_current_screen() : null; | |
| if (!$screen || strpos($screen->id, 'independent-analytics') === false) { | |
| return; | |
| } | |
| $sidebar_logo = 'https://mkdeesigns.com/wp-content/uploads/2026/01/Analytics-by-MK-Designs.png'; //change URL to your logo | |
| ?> | |
| <script> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| add_action('admin_init', function () { | |
| // Check if the current URL matches the target URL | |
| $current_url = $_SERVER['REQUEST_URI']; | |
| $target_url = '/wp-admin/admin.php?page=jet-cct-your-cct'; // Your specific CCT URL | |
| if (strpos($current_url, $target_url) === false) { | |
| return; // Exit if the current URL does not match the target URL | |
| } | |
| // Check if the action is triggered by the CCT delete button |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Add following script in HTML widget of your JetForm. | |
| <script> | |
| (function() { | |
| // Initialize the universal clear button for the form | |
| function initializeUniversalClearButton() { | |
| const form = document.querySelector('.jet-form-builder'); | |
| if (!form) return; | |
| // Create the universal clear button |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| If you have more than one checkbox fields in same form, and want to target only specific checkbox field. | |
| Assign specific class to desired checkbox. Instead assigning custom class to checkbox field, add class to parent block of checkbox field. | |
| Below, I have added ".checkbox-needed" class to parent block. | |
| ------------------------------------------------- | |
| Add below CSS via plugin or custom CSS. This will ensure extra checkbox fields are hidden by default for specific class which we assigned initially. | |
| .checkbox-needed .jet-form-builder__field-wrap:nth-of-type(n+6) { // You can adjust "6" as per your requirements. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Add below CSS via plugin or custom CSS. This will ensure extra checkbox fields are hidden by default. | |
| .jet-form-builder__field-wrap:nth-of-type(n+6) { | |
| display: none; | |
| } | |
| ------------------------------------------------- | |
| Add below HTML in JetForm to add button | |
| <div class="checkbox-controls"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Get all the upload fields | |
| const uploadFields = [ | |
| document.getElementById('form_field_name_1'), // change 'form_field_name_1' and other with your field ids | |
| document.getElementById('form_field_name_2'), | |
| document.getElementById('form_field_name_3'), | |
| document.getElementById('form_field_name_4') | |
| ]; | |
| // Function to check for duplicate files | |
| function checkDuplicateFiles(currentField) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 🇦🇫 Afghanistan +93 | |
| 🇦🇱 Albania +355 | |
| 🇩🇿 Algeria +213 | |
| 🇦🇸 American Samoa +1-684 | |
| 🇦🇩 Andorra +376 | |
| 🇦🇴 Angola +244 | |
| 🇦🇮 Anguila +1-264 | |
| 🇦🇬 Antigua and Barbuda +1-268 | |
| 🇦🇷 Argentina +54 | |
| 🇦🇲 Armenia +374 |