Changeset 3610560
- Timestamp:
- 07/16/2026 05:16:25 PM (3 months ago)
- Location:
- divine-smart-forms/trunk
- Files:
-
- 9 edited
-
admin/assets/js/form-builder.js (modified) (1 diff)
-
admin/views/entries-list.php (modified) (1 diff)
-
admin/views/form-builder.php (modified) (1 diff)
-
divine-smart-forms.php (modified) (2 diffs)
-
includes/core/class-divine-shortcode.php (modified) (2 diffs)
-
public/assets/css/form-styles.css (modified) (1 diff)
-
public/assets/js/form-script.js (modified) (2 diffs)
-
readme.txt (modified) (5 diffs)
-
templates/form/wrapper.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
divine-smart-forms/trunk/admin/assets/js/form-builder.js
r3514051 r3610560 49 49 function labelForType(type) { 50 50 var labels = { 51 text:'Text', textarea:'Textarea', email:'Email', phone:'Phone',51 name:'Name', text:'Text', textarea:'Textarea', email:'Email', phone:'Phone', 52 52 number:'Number', url:'URL', password:'Password', 53 53 dropdown:'Dropdown', radio:'Radio Buttons', checkbox:'Checkbox', multiselect:'Multi Select', -
divine-smart-forms/trunk/admin/views/entries-list.php
r3514051 r3610560 56 56 57 57 $divismfo_name = '-'; 58 $divismfo_name_found = false; 58 59 foreach ($divismfo_fields as $divismfo_field) { 59 if ( in_array($divismfo_field['type'], ['text'], true) || stripos($divismfo_field['label'], 'name') !== false) {60 if ($divismfo_field['type'] === 'name') { 60 61 $divismfo_field_key = !empty($divismfo_field['custom_name']) ? $divismfo_field['custom_name'] : $divismfo_field['id']; 61 62 if (!empty($divismfo_entry_data[$divismfo_field_key])) { 62 63 $divismfo_name = $divismfo_entry_data[$divismfo_field_key]; 64 $divismfo_name_found = true; 63 65 break; 66 } 67 } 68 } 69 70 if (!$divismfo_name_found) { 71 foreach ($divismfo_fields as $divismfo_field) { 72 if (in_array($divismfo_field['type'], ['text'], true) || stripos($divismfo_field['label'], 'name') !== false) { 73 $divismfo_field_key = !empty($divismfo_field['custom_name']) ? $divismfo_field['custom_name'] : $divismfo_field['id']; 74 if (!empty($divismfo_entry_data[$divismfo_field_key])) { 75 $divismfo_name = $divismfo_entry_data[$divismfo_field_key]; 76 break; 77 } 64 78 } 65 79 } -
divine-smart-forms/trunk/admin/views/form-builder.php
r3514051 r3610560 54 54 <div class="divine-field-group"> 55 55 <div class="divine-field-group-title">Basic</div> 56 <button class="divine-add-field" data-type="name">Name</button> 56 57 <button class="divine-add-field" data-type="text">Text</button> 57 58 <button class="divine-add-field" data-type="textarea">Textarea</button> -
divine-smart-forms/trunk/divine-smart-forms.php
r3531303 r3610560 4 4 * Plugin URI: https://wordpress.org/plugins/divine-smart-forms/ 5 5 * Description: Create responsive contact forms, lead forms, and custom forms using a simple drag & drop builder. 6 * Version: 1.2. 26 * Version: 1.2.3 7 7 * Author: Aditya Singh 8 * Author URI: https:// divinesmartforms.wuaze.com/8 * Author URI: https://www.linkedin.com/in/devadityadivine 9 9 * License: GPL v2 or later 10 10 * Text Domain: divine-smart-forms … … 14 14 if (!defined('ABSPATH')) exit; 15 15 16 define('DIVISMFO_VERSION', '1.2. 2');16 define('DIVISMFO_VERSION', '1.2.3'); 17 17 define('DIVISMFO_PATH', plugin_dir_path(__FILE__)); 18 18 define('DIVISMFO_URL', plugin_dir_url(__FILE__)); -
divine-smart-forms/trunk/includes/core/class-divine-shortcode.php
r3531303 r3610560 10 10 wp_enqueue_style('divismfo-form-css', DIVISMFO_URL . 'public/assets/css/form-styles.css', [], DIVISMFO_VERSION); 11 11 wp_enqueue_script('divismfo-form-js', DIVISMFO_URL . 'public/assets/js/form-script.js', ['jquery'], DIVISMFO_VERSION, true); 12 $form = Divismfo_Form_Manager::divismfo_get_form($form_id); 13 if (!$form || $form->status !== 'active') return '<p>' . esc_html__('Form not found or inactive.', 'divine-smart-forms') . '</p>'; 14 15 $has_phone = false; 16 if (!empty($form->fields) && is_array($form->fields)) { 17 foreach ($form->fields as $field) { 18 if (($field['type'] ?? '') === 'phone') { 19 $has_phone = true; 20 break; 21 } 22 } 23 } 24 25 if ($has_phone) { 26 wp_enqueue_style('divismfo-intl-tel-input-css', DIVISMFO_URL . 'public/assets/vendor/intl-tel-input/css/intlTelInput.min.css', [], DIVISMFO_VERSION); 27 wp_enqueue_script('divismfo-intl-tel-input-js', DIVISMFO_URL . 'public/assets/vendor/intl-tel-input/js/intlTelInput.min.js', [], DIVISMFO_VERSION, true); 28 } 29 12 30 wp_localize_script('divismfo-form-js', 'divismfoForm', [ 13 31 'ajax_url' => admin_url('admin-ajax.php'), 14 32 'nonce' => wp_create_nonce('divismfo_form_nonce'), 33 'intl_tel_utils_url' => DIVISMFO_URL . 'public/assets/vendor/intl-tel-input/js/utils.js', 15 34 'i18n' => [ 16 35 'please_wait' => __('Please wait...', 'divine-smart-forms'), … … 22 41 ]); 23 42 24 $form = Divismfo_Form_Manager::divismfo_get_form($form_id);25 if (!$form || $form->status !== 'active') return '<p>' . esc_html__('Form not found or inactive.', 'divine-smart-forms') . '</p>';26 27 43 ob_start(); 28 44 include DIVISMFO_PATH . 'templates/form/wrapper.php'; -
divine-smart-forms/trunk/public/assets/css/form-styles.css
r3531303 r3610560 78 78 .divine-form-message.error { background: #fee2e2; color: #991b1b; border: 1px solid #fca5a5; } 79 79 .divine-error { color: #dc2626; font-size: 13px; margin-top: 4px; display: block; } 80 81 /* intl-tel-input overrides */ 82 .divine-form .iti { width: 100%; } 83 .divine-form .iti__country-list { z-index: 999; } -
divine-smart-forms/trunk/public/assets/js/form-script.js
r3531303 r3610560 1 1 jQuery(document).ready(function($) { 2 2 var i18n = divismfoForm.i18n || {}; 3 4 if (typeof window.intlTelInput !== 'undefined') { 5 document.querySelectorAll('.divine-form input[type="tel"]').forEach(function(input) { 6 var iti = window.intlTelInput(input, { 7 initialCountry: "auto", 8 separateDialCode: true, 9 geoIpLookup: function(callback) { 10 callback("in"); 11 }, 12 utilsScript: divismfoForm.intl_tel_utils_url || "" 13 }); 14 input.divismfoIti = iti; 15 }); 16 } 3 17 4 18 $(document).on('input change', '.divine-range-input', function() { … … 49 63 var name = el.attr('name'); 50 64 if (!name || el.attr('type') === 'file') return; 65 66 if (el.attr('type') === 'tel' && this.divismfoIti) { 67 formData[name] = this.divismfoIti.getNumber(); 68 return; 69 } 51 70 52 71 if (name.slice(-2) === '[]') { -
divine-smart-forms/trunk/readme.txt
r3531303 r3610560 1 1 === Divine Smart Forms - Drag & Drop Contact Form Builder === 2 2 Contributors: divineboyaditya 3 Tags: login forms, contact form, automation forms, contact form , form3 Tags: contact form, form builder, drag and drop forms, custom forms, WordPress forms 4 4 Requires at least: 6.0 5 Tested up to: 6.95 Tested up to: 7.0 6 6 Requires PHP: 7.4 7 Stable tag: 1.2. 27 Stable tag: 1.2.3 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 100 100 = Optional Plugin Tracking = 101 101 102 This plugin can optionally send limited analytics data to the developer through Supabase only after a site administrator explicitly allows trackingfrom the plugin settings or tracking prompt.102 This plugin can optionally send limited analytics data to the Team only after a site administrator explicitly allow from the plugin settings or tracking prompt. 103 103 104 104 Data sent when tracking is allowed: … … 109 109 * PHP version 110 110 * Plugin version 111 * Site domain name 112 113 When data is sent: 114 115 * Only after an administrator clicks `Allow Tracking` 116 * When tracking is first enabled 117 * During plugin activation and deactivation after consent 118 * Periodically while the plugin remains active, for lightweight install status updates 119 120 Service provider: 121 122 * Supabase: [Terms of Service](https://supabase.com/terms), [Privacy Policy](https://supabase.com/privacy) 111 * Site Url 123 112 124 113 == Installation == … … 160 149 Yes. You can enable debug logging from the plugin settings when troubleshooting. 161 150 162 = Does this plugin track usage? =163 164 Only if an administrator explicitly allows tracking. If tracking is skipped, the plugin will not send analytics requests to external services.165 166 151 == Changelog == 167 152 153 = 1.2.3 = 154 155 * Added Name field type for dedicated name collection in forms. 156 * Added international phone input with country flag selector and automatic country code prefixing. 157 * Updated entries list to prioritize the Name field type for the Name column. 158 * Tested up to WordPress 7.0 159 168 160 = 1.2.2 = 169 170 * Added an opt-in Supabase tracking system with admin consent controls.171 * Added optional tracking for activation status, plugin version, WordPress version, PHP version, and domain name after consent.172 161 * Added privacy policy helper text and external service disclosure for optional tracking. 173 162 * Fixed uninstall cleanup so plugin data is only removed when the delete-on-uninstall setting is enabled. … … 199 188 == Upgrade Notice == 200 189 190 = 1.2.3 = 191 192 * Adds Name field type and international phone input with country flags. 193 201 194 = 1.2.2 = 202 195 203 * Adds optional consent-based tracking, fixes uninstall data retention behavior, and resolves file upload handling issues.196 * Fixes uninstall data retention behavior, and resolves file upload handling issues. 204 197 205 198 = 1.2.1 = -
divine-smart-forms/trunk/templates/form/wrapper.php
r3531303 r3610560 39 39 <?php switch ($divismfo_type): 40 40 case 'text': 41 case 'name': 41 42 case 'email': 42 43 case 'phone': … … 47 48 case 'time': ?> 48 49 <input 49 type="<?php echo esc_attr($divismfo_type === 'phone' ? 'tel' : $divismfo_type); ?>"50 type="<?php echo esc_attr($divismfo_type === 'phone' ? 'tel' : ($divismfo_type === 'name' ? 'text' : $divismfo_type)); ?>" 50 51 id="<?php echo esc_attr($divismfo_field_id); ?>" 51 52 name="<?php echo esc_attr($divismfo_name); ?>"
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)