YetiForceCompany / YetiForceCRM

Our team created for you one of the most innovative CRM systems that supports mainly business processes and allows for customization according to your needs. Be ahead of your competition and implement YetiForce!
https://yetiforce.com
Other
1.72k stars 746 forks source link

Select - Pick List field #3134

Closed StaggerLeee closed 8 years ago

StaggerLeee commented 8 years ago

Can you please make it a bit easier to insert huge lists of values. Specially list of countries, etc..

It is probably easy to set tokenSeparators in Select2 script, but would be nice to avoid touching core files. Library files cannot be overriden yet.

https://github.com/select2/select2/issues/3458

StaggerLeee commented 8 years ago

I entered all countries manually, for now tills this is made possible. Here is it to save your time, just import it in database. Field name is "country", english country names. If some is missing just ad it and drag and drop it on right place.

Copy text and make for instance "some_database.sql" file and import it with phpmyadmin to your Yeti database.

-- phpMyAdmin SQL Dump
-- version 4.6.1
-- http://www.phpmyadmin.net
--
-- Host: 127.0.0.1
-- Generation Time: Jul 15, 2016 at 06:27 PM
-- Server version: 5.7.11
-- PHP Version: 5.6.18

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET time_zone = "+00:00";

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Database: `some_database`
--

-- --------------------------------------------------------

--
-- Table structure for table `vtiger_country`
--

CREATE TABLE `vtiger_country` (
  `countryid` int(11) NOT NULL,
  `country` varchar(200) NOT NULL,
  `sortorderid` int(11) DEFAULT NULL,
  `presence` int(11) NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `vtiger_country`
--

INSERT INTO `vtiger_country` (`countryid`, `country`, `sortorderid`, `presence`) VALUES
(1, 'Afghanistan', 1, 1),
(2, 'Albania', 2, 1),
(3, 'Algeria', 3, 1),
(4, 'Andorra', 4, 1),
(5, 'Angola', 5, 1),
(6, 'Antigua & Deps', 6, 1),
(7, 'Argentina', 7, 1),
(8, 'Armenia', 8, 1),
(9, 'Australia', 9, 1),
(10, 'Austria', 10, 1),
(11, 'Azerbaijan', 11, 1),
(12, 'Bahamas', 12, 1),
(13, 'Bahrain', 13, 1),
(14, 'Bangladesh', 14, 1),
(15, 'Barbados', 15, 1),
(16, 'Belarus', 16, 1),
(17, 'Belgium', 17, 1),
(18, 'Belize', 18, 1),
(19, 'Benin', 19, 1),
(20, 'Bhutan', 20, 1),
(21, 'Bolivia', 21, 1),
(22, 'Bosnia & Herzegovina', 22, 1),
(23, 'Botswana', 23, 1),
(24, 'Brazil', 24, 1),
(25, 'Brunei', 25, 1),
(26, 'Bulgaria', 26, 1),
(27, 'Burkina', 27, 1),
(28, 'Burundi', 28, 1),
(29, 'Cambodia', 29, 1),
(30, 'Cameroon', 30, 1),
(31, 'Canada', 31, 1),
(32, 'Cape Verde', 32, 1),
(33, 'Central African Rep', 33, 1),
(34, 'Chad', 34, 1),
(35, 'Chile', 35, 1),
(36, 'China', 36, 1),
(37, 'Colombia', 37, 1),
(38, 'Comoros', 38, 1),
(39, 'Congo', 39, 1),
(40, 'Congo {Democratic Rep}', 40, 1),
(41, 'Costa Rica', 41, 1),
(42, 'Croatia', 42, 1),
(43, 'Cuba', 43, 1),
(44, 'Cyprus', 44, 1),
(45, 'Czech Republic', 45, 1),
(46, 'Denmark', 46, 1),
(47, 'Djibouti', 47, 1),
(48, 'Dominica', 48, 1),
(49, 'Dominican Republic', 49, 1),
(50, 'East Timor', 50, 1),
(51, 'Ecuador', 51, 1),
(52, 'Egypt', 52, 1),
(53, 'El Salvador', 53, 1),
(54, 'Equatorial Guinea', 54, 1),
(55, 'Eritrea', 55, 1),
(56, 'Estonia', 56, 1),
(57, 'Ethiopia', 57, 1),
(58, 'Fiji', 58, 1),
(59, 'Finland', 59, 1),
(60, 'France', 60, 1),
(61, 'Gabon', 61, 1),
(62, 'Gambia', 62, 1),
(63, 'Georgia', 63, 1),
(64, 'Germany', 64, 1),
(65, 'Ghana', 65, 1),
(66, 'Greece', 66, 1),
(67, 'Grenada', 67, 1),
(68, 'Guatemala', 68, 1),
(69, 'Guinea', 69, 1),
(70, 'Guinea Bissau', 70, 1),
(71, 'Guyana', 71, 1),
(72, 'Haiti', 72, 1),
(73, 'Honduras', 73, 1),
(74, 'Hungary', 74, 1),
(75, 'Iceland', 75, 1),
(76, 'India', 76, 1),
(77, 'Indonesia', 77, 1),
(78, 'Iran', 78, 1),
(79, 'Iraq', 79, 1),
(80, 'Ireland', 80, 1),
(81, 'Israel', 81, 1),
(82, 'Italy', 82, 1),
(83, 'Ivory Coast', 83, 1),
(84, 'Jamaica', 84, 1),
(85, 'Japan', 85, 1),
(86, 'Jordan', 86, 1),
(87, 'Kazakhstan', 87, 1),
(88, 'Kenya', 88, 1),
(89, 'Kiribati', 89, 1),
(90, 'Korea North', 90, 1),
(91, 'Korea South', 91, 1),
(92, 'Kosovo', 92, 1),
(93, 'Kuwait', 93, 1),
(94, 'Kyrgyzstan', 94, 1),
(95, 'Laos', 95, 1),
(96, 'Latvia', 96, 1),
(97, 'Lebanon', 97, 1),
(98, 'Lesotho', 98, 1),
(99, 'Liberia', 99, 1),
(100, 'Libya', 100, 1),
(101, 'Liechtenstein', 101, 1),
(102, 'Lithuania', 102, 1),
(103, 'Luxembourg', 103, 1),
(104, 'Macedonia', 104, 1),
(105, 'Madagascar', 105, 1),
(106, 'Malawi', 106, 1),
(107, 'Malaysia', 107, 1),
(108, 'Maldives', 108, 1),
(109, 'Mali', 109, 1),
(110, 'Malta', 110, 1),
(111, 'Marshall Islands', 111, 1),
(112, 'Mauritania', 112, 1),
(113, 'Mauritius', 113, 1),
(114, 'Mexico', 114, 1),
(115, 'Micronesia', 115, 1),
(116, 'Moldova', 116, 1),
(117, 'Monaco', 117, 1),
(118, 'Mongolia', 118, 1),
(119, 'Montenegro', 119, 1),
(120, 'Morocco', 120, 1),
(121, 'Mozambique', 121, 1),
(122, 'Myanmar', 122, 1),
(123, 'Namibia', 123, 1),
(124, 'Nauru', 124, 1),
(125, 'Nepal', 125, 1),
(126, 'Netherlands', 126, 1),
(127, 'New Zealand', 127, 1),
(128, 'Nicaragua', 128, 1),
(129, 'Niger', 129, 1),
(130, 'Nigeria', 130, 1),
(131, 'Norway', 131, 1),
(132, 'Oman', 132, 1),
(133, 'Pakistan', 133, 1),
(134, 'Palau', 134, 1),
(135, 'Panama', 135, 1),
(136, 'Papua New Guinea', 136, 1),
(137, 'Paraguay', 137, 1),
(138, 'Peru', 138, 1),
(139, 'Philippines', 139, 1),
(140, 'Poland', 140, 1),
(141, 'Portugal', 141, 1),
(142, 'Qatar', 142, 1),
(143, 'Romania', 143, 1),
(144, 'Russian Federation', 144, 1),
(145, 'Rwanda', 145, 1),
(146, 'St Kitts & Nevis', 146, 1),
(147, 'St Lucia', 147, 1),
(148, 'Saint Vincent & the Grenadines', 148, 1),
(149, 'Samoa', 149, 1),
(150, 'San Marino', 150, 1),
(151, 'Sao Tome & Principe', 151, 1),
(152, 'Saudi Arabia', 152, 1),
(153, 'Senegal', 153, 1),
(154, 'Serbia', 154, 1),
(155, 'Seychelles', 155, 1),
(156, 'Sierra Leone', 156, 1),
(157, 'Singapore', 157, 1),
(158, 'Slovakia', 158, 1),
(159, 'Slovenia', 159, 1),
(160, 'Solomon Islands', 160, 1),
(161, 'Somalia', 161, 1),
(162, 'South Africa', 162, 1),
(163, 'South Sudan', 163, 1),
(164, 'Spain', 164, 1),
(165, 'Sri Lanka', 165, 1),
(166, 'Sudan', 166, 1),
(167, 'Suriname', 167, 1),
(168, 'Swaziland', 168, 1),
(169, 'Sweden', 169, 1),
(170, 'Switzerland', 170, 1),
(171, 'Syria', 171, 1),
(172, 'Taiwan', 172, 1),
(173, 'Tajikistan', 173, 1),
(174, 'Tanzania', 174, 1),
(175, 'Thailand', 175, 1),
(176, 'Togo', 176, 1),
(177, 'Tonga', 177, 1),
(178, 'Trinidad & Tobago', 178, 1),
(179, 'Tunisia', 179, 1),
(180, 'Turkey', 180, 1),
(181, 'Turkmenistan', 181, 1),
(182, 'Tuvalu', 182, 1),
(183, 'Uganda', 183, 1),
(184, 'Ukraine', 184, 1),
(185, 'United Arab Emirates', 185, 1),
(186, 'United Kingdom', 186, 1),
(187, 'United States', 187, 1),
(188, 'Uruguay', 188, 1),
(189, 'Uzbekistan', 189, 1),
(190, 'Vanuatu', 190, 1),
(191, 'Vatican City', 191, 1),
(192, 'Venezuela', 192, 1),
(193, 'Vietnam', 193, 1),
(194, 'Yemen', 194, 1),
(195, 'Zambia', 195, 1),
(196, 'Zimbabwe', 196, 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `vtiger_country`
--
ALTER TABLE `vtiger_country`
  ADD PRIMARY KEY (`countryid`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `vtiger_country`
--
ALTER TABLE `vtiger_country`
  MODIFY `countryid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=197;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
paula-w commented 8 years ago

You can now paste values separated by a comma, and they will be added to picklists.

vovpff commented 8 years ago

@paula-w from what ver? 3.1.1008: image

paula-w commented 8 years ago

@vovpff What module is that?

vovpff commented 8 years ago

@paula-w I tried different modules. ver 3.1.1015: image

paula-w commented 8 years ago

This is not the right place to use this feature. This mechanism only works for multiple choice fields, eg. while creating new multipicklist.
For example: 11

vovpff commented 8 years ago

@paula-w at your screenshot there are usual picklist not multi select combo-box. I tried this at Edit fields menu. This is works with picklist and multi select combo-box. It's very good to have possibility to add a lot of values by copy-paste. I think good idea to made same functionality at Picklist editor because sometimes needed to add a lot of values to already used in a past picklist.

ldgbc commented 7 years ago

That is correct, adding numerous field is only available during First Custom Field creation. It be good if it also available while using the "Picklist Editors". Currently vTiger 7 support both.

mariuszkrzaczkowski commented 7 years ago

Countries have been added as a selection list https://github.com/YetiForceCompany/YetiForceCRM/commit/e483c63b2b467aeef3b216a7806c01549bda9c56

AdayLopez commented 6 years ago

I am trying to add a "country field" as a custom field but don't know where to find it. Any help?