Ultimate Member - Two and Three Way Dropdown options
Extension to Ultimate Member for defining two or three way dropdown options either in a spreadsheet saved as a CSV file or as a formatted TXT file.
by Miss Veronica · github.com/missveronica/um-three-way-dropdowns
★ 2stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/missveronica/um-three-way-dropdowns/archive/refs/heads/main.zipExtension to Ultimate Member for defining two or three way dropdown options either in a spreadsheet saved as a CSV file or as a formatted TXT file. Create the CSV files with an app which can export a file with CSV format like Excel or LibreOffice etc. From version 3.2.0 there is an option to use a text TXT file for defining dropdown options. Only UM Form's single select dropdowns are supported.
CSV files and format
- Two or Three columns one column for each of the two or three levels https://imgur.com/a/gqXH9Fo
- Column sort order Top, Middle, Bottom
- CSV file field separators selectable.
- Create and upload the CSV files with your FTP client to this folder:
.../wp-content/uploads/ultimatemember/threewaydropdowns/ - All Dropdown selections use the same uploads folder.
- Single or double quotes around CSV text fields are removed by the plugin.
Optional text TXT file format
- See example here https://github.com/MissVeronica/um-three-way-dropdowns/issues/2
- Create and upload the TXT file as example.txt with your FTP client to the
.../wp-content/uploads/ultimatemember/threewaydropdowns/folder - The UM Settings in main tab Dropdowns entry will convert the example.txt file to example.txt.csv
- Enter example.txt.csv in settings 3. CSV File Names
- Select columns A and B in settings 4. CSV File spreadsheet select two or three columns
- No selections in settings 5. and 6.
- Select "Semicolon" in setting 7. CSV File field separator
- https://imgur.com/a/ORUs06L
UM Settings in main tab Dropdowns
- Select the Top dropdown's "Label - meta_key" - The Middle dropdown will rely on the Top parent meta_key for Options selection
- Select the Middle dropdown's "Label - meta_key" - The Bottom dropdown will rely on the Middle parent meta_key for Options selection
- CSV File Names (one name per line) - Enter the CSV files names one per line.
- CSV File spreadsheet select two or three columns - Select the two or three columns in the spreadsheet where you have Top, Middle and Bottom options.
- CSV File spreadsheet select two or three columns for option texts - Select the two or three columns in the spreadsheet where you have Top, Middle if two and include also Bottom if three options text message.
- CSV File header line remove - Click if you have a header line in the first line of the CSV files.
- CSV File field separator - Select the separator character.
- WordPress autoload of options - Click to improve response times of options load.
- Load all top dropdown options - Click to load all top dropdown options regardless of not selected by any User.
- Sort top dropdown options - Click to sort ascending the top dropdown options displayed.
- Sort mid/btm dropdown options - Click to sort ascending all mid and bottom dropdown options displayed.
- Log the plugin's callback requests/replies - Click to log the plugin's callback requests/replies to the file .../wp-content/debug.log
- https://imgur.com/a/2PmljWx
- https://imgur.com/a/JAWrN1j
Migration from Version 2 to 3
- The first Dropdown section is reusing settings and callbacks from version 2 when being enabled.
- New settings for top and middle level meta-keys must be selected.
UM Form Builder Settings
- Callbacks are displayed at each dropdown's enable checkbox
- Examples with: State, Section, Group https://imgur.com/a/maYaqwd
Caching of options
- Dropdown options cache is updated from current uploaded .txt or .csv files in the folder each time you click at one of the sublinks in UM Settings -> Dropdowns
Test file
- Use the file "dropdowns.csv" or "dropdowns-a.csv" in the plugin directory: um-three-way-dropdowns-main
Demo
- https://imgur.com/a/IyiEr86
- Test with World Countries, States and Cities from https://github.com/dr5hn/countries-states-cities-database/blob/master/csv/cities.csv
- Extracted the three fields and moved them in order Countries, States, Cities and CSV file size almost 6 MByte.
- Test CSV file with 196 countries, 3497 States and 150362 Cities parsed and cached in 1.7 seconds by the web hosting server.
Updates
- Version 2.0.0 Multiple CSV files being cached and CSV spreadsheet column selections.
- Version 2.1.0 Bug fixing when plugin first run.
- Version 2.2.0 Header line removal, line terminator update
- Version 2.3.0 CSV Field Separator selection.
- Version 3.1.0 Support for 5 CSV dropdowns with either 2 or 3 levels. Updated the documentation in the plugin.
- Version 3.2.0 Code improvements. Text file input in addition to .CSV file.
- Version 3.2.1 Code improvements for Members Directory
- Version 3.2.2 Code improvements for Members Directory and addition of sorting options and callback logging
- Version 3.2.3 Code improvements for callback logging
- Version 3.2.4 Load all top dropdown options
Installation
- Install by downloading the plugin ZIP file and install as a new Plugin, which you upload in WordPress -> Plugins -> Add New -> Upload Plugin.
- Activate the Plugin: Ultimate Member - Two and Three Way Dropdown options