Advertisement:

Navigation

SMF Mod Site

Mod Name:
Custom Profile Field - Sort Select Box/Radio Button Options
Created By:
GL700Wing
Type:
Administrative
First Created:
August 20, 2020, 07:17:46 AM
Last Modified:
October 12, 2020, 06:46:28 AM
Latest Version:
1.0
Compatible With:
2.0.17
Total Downloads:
60

Download this mod

CustomProfileField-SortSelectRadioOptions_1.0.zip (5kB) [20]
Manual Install Instructions for SMF


Below are some preview images of what the mod looks like when being used

Description:

By default the options for 'Select Box' and 'Radio Button' in Custom Profile Fields cannot be sorted - they have to be reordered manually.  In situations where it is necessary to periodically add a new option like a calendar year and have the list displayed in descending order, or add a new model of an item and have the list displayed in ascending order, this can become quite time consuming.

This modification enables the ascending/descending sorting of the options for 'Select Box' and 'Radio Button' custom profile fields prior to them being saved.  There is also a 'No change' option (this is the default option) to preserve the order of the options if the Ascending or Descending sort options are not selected.

Also, and because care must be taken to not change the text when manually reordering options to ensure that user data is not lost, this mod provides a means to sort the options without any need to copy/paste/retype the text.



License
Copyright 2020 Kathy Leslie

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.

2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.