Changeset 3275689
- Timestamp:
- 04/17/2025 10:56:11 AM (11 months ago)
- Location:
- gforms-addon-for-country-and-state-selection
- Files:
-
- 17 added
- 3 edited
-
tags/1.1 (added)
-
tags/1.1/assets (added)
-
tags/1.1/assets/css (added)
-
tags/1.1/assets/css/admin.css (added)
-
tags/1.1/assets/data (added)
-
tags/1.1/assets/data/states.csv (added)
-
tags/1.1/assets/images (added)
-
tags/1.1/assets/images/ajax_loader.gif (added)
-
tags/1.1/assets/js (added)
-
tags/1.1/assets/js/admin.js (added)
-
tags/1.1/assets/js/fields.js (added)
-
tags/1.1/class-gf-cws-fields.php (added)
-
tags/1.1/includes (added)
-
tags/1.1/includes/class-gf-cws-admin-fields.php (added)
-
tags/1.1/includes/functions.php (added)
-
tags/1.1/index.php (added)
-
tags/1.1/readme.txt (added)
-
trunk/includes/functions.php (modified) (2 diffs)
-
trunk/index.php (modified) (2 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
gforms-addon-for-country-and-state-selection/trunk/includes/functions.php
r2634709 r3275689 58 58 59 59 $newcountrys = array_shift($newcountry); 60 // ksort($newcountry); 61 62 // $country_option = ""; 63 // $country_option .= "<option value=''>Empty (no choices selected)</option>"; 64 // $bolean = false; 65 // $arr = array(); 66 // if($country_request == 'country'){ 67 // foreach($newcountry as $countryname => $val_country){ 68 // $country_option .= "<option value='{$countryname}'>{$countryname}</option>"; 69 // } 70 // }else{ 71 // ksort($newcountry[$country_request]); 72 73 // foreach($newcountry[$country_request] as $countryname => $val_country){ 74 // if($val_country == $state_request){ 75 // $country_option .= "<option value='{$val_country}' selected>{$val_country}</option>"; 76 // } 77 // $country_option .= "<option value='{$val_country}'>{$val_country}</option>"; 78 // } 79 // } 60 80 ksort($newcountry); 61 62 $country_option = ""; 63 $country_option .= "<option value=''>Empty (no choices selected)</option>"; 64 $bolean = false; 65 $arr = array(); 66 if($country_request == 'country'){ 67 foreach($newcountry as $countryname => $val_country){ 68 $country_option .= "<option value='{$countryname}'>{$countryname}</option>"; 69 } 70 }else{ 71 ksort($newcountry[$country_request]); 72 73 foreach($newcountry[$country_request] as $countryname => $val_country){ 74 if($val_country == $state_request){ 75 $country_option .= "<option value='{$val_country}' selected>{$val_country}</option>"; 76 } 77 $country_option .= "<option value='{$val_country}'>{$val_country}</option>"; 78 } 81 82 $country_option = "<option value=''>Empty (no choices selected)</option>"; 83 $bolean = false; 84 $arr = array(); 85 86 if ($country_request === 'country') { 87 foreach ($newcountry as $countryname => $val_country) { 88 $country_option .= "<option value='{$countryname}'>{$countryname}</option>"; 79 89 } 80 90 } elseif (!empty($country_request) && isset($newcountry[$country_request])) { 91 ksort($newcountry[$country_request]); 92 foreach ($newcountry[$country_request] as $val_country) { 93 $selected = ($val_country === $state_request) ? 'selected' : ''; 94 $country_option .= "<option value='{$val_country}' {$selected}>{$val_country}</option>"; 95 } 96 } 97 81 98 array_push($arr,$country_option); 82 99 array_push($arr,$bolean); … … 87 104 new GFCWS_Countrywisestate_Field_Ajax; 88 105 ?> 106 -
gforms-addon-for-country-and-state-selection/trunk/index.php
r2634709 r3275689 4 4 * Plugin URI: https://plugins.hirewebxperts.com/ 5 5 * Description: Country and State Selection Addon for Gravity Forms is used to add country and state dropdown fields depending on your needs. By default, all the countries of the world appear on the country select dropdown on the form and once you select any specific country, its respective states appear in the state select dropdown. All the countries and states are already available in the addon by default. 6 * Version: 1. 06 * Version: 1.1 7 7 * Author: Coder426 8 8 * Author URI: https://hirewebxperts.com/ … … 18 18 19 19 /* Plugin details */ 20 $version = '1. 0';20 $version = '1.1'; 21 21 $name = 'gforms-addon-for-country-and-state-selection'; 22 22 $dir_name = 'gforms-addon-for-country-and-state-selection'; -
gforms-addon-for-country-and-state-selection/trunk/readme.txt
r3192382 r3275689 4 4 Tags: Gravity form, form, gf 5 5 Requires at least: 4.9.10 6 Tested up to: 6. 76 Tested up to: 6.8 7 7 Requires PHP: 8.1 8 Stable tag: 1. 08 Stable tag: 1.1 9 9 License: GPLv3 10 10 License URI: https://www.gnu.org/licenses/gpl-3.0.html … … 33 33 The plugin is simple to install: 34 34 35 * Download gforms-addon-for-country-and-state-selection.1. 0.zip35 * Download gforms-addon-for-country-and-state-selection.1.1.zip 36 36 * Unzip 37 37 * Upload gforms-addon-for-country-and-state-selection directory to your /wp-content/plugins directory … … 53 53 == Changelog == 54 54 55 = 1.0 - 24/Nov/2021 = 55 = 1.1 - 17/Apr/2025 = 56 - Minor bug fixed 57 58 = 1.0 - 24/Nov/2021 =
Note: See TracChangeset
for help on using the changeset viewer.