Open apmuthu opened 4 years ago
Thank you for pointing out where this can be fixed in existing installs. I was lost trying to pinpoint why optgroups weren't showing in groups for dropdowns (was previously using an older version that did not have the issue).
This is still a bug in 3.1.1
Smarty v3.1.31 (14.12.2016) is used in FormTools v3.1.1. The fixes for vFT3.1.1 is here: FT3.1.1_fixes_global-code-field_types.zip
FormTools v3.0.20
The
optgroup
code is not generated as there is a typo in the variable name in the smarty template code.Smarty v2 syntax is still used in FT 3 and is available for
foreach
command at: https://www.smarty.net/docsv2/en/language.function.foreach.tplHowever, FormTools v3 still relies on the old syntax though it now uses Smarty 3.x library.
The files at:
global\code\field_types\Dropdown.class.php
global\code\field_types\MultiSelect.class.php
should have the variable$group_info["name"]
replaced with$group_info["group_name"]
.These files were used in FormTools v2 but are still there for maybe compatibility reasons of some modules. They are now superseded by having the templates stored in the database table
field_types
.Consequently, the following sql statements need to be executed for existing installs to effect the above variable replacement (suitably edited for your table prefix):
This enables the use of grouped selects and multi selects.
For new installs, the installer sql may need to be changed accordingly unless the information is sucked into the table from the above files.