The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
![]() |
Field option groups - checkbox - different delimiter possible? - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: General Discussion (https://forums.formtools.org/forumdisplay.php?fid=5) +--- Thread: Field option groups - checkbox - different delimiter possible? (/showthread.php?tid=1352) |
Field option groups - checkbox - different delimiter possible? - wavesource - Jun 3rd, 2011 I am developing a project where data in a checkbox field (multiple selections) needs to have a pipe delimiter between values instead of the comma space currently defined by default by FormTools when I set up the Field Option group for this field in the GUI. I can't see any option to define a different delimiter in the setup options for checkbox fields etc. Is there another way to force this to happen? RE: Field option groups - checkbox - different delimiter possible? - Ben - Jun 5th, 2011 Yes.... but I hesitate to bring it up because you'll maybe be the second person in the entire history of Form Tools to change it. I'm pretty sure it's safe to change but I won't fib: I haven't done it myself since the original 2.0.0 beta. That's why I stuck it in Section 2 of the library.php variables ("Section 2: the settings below should NOT be overwritten") to be on the safe side. Add this line to your /global/config.php file: PHP Code: $g_multi_val_delimiter = "|"; However, you'll need to manually change all the values already in the database to change it to use this new delimiter. Let me know how it goes. - Ben RE: Field option groups - checkbox - different delimiter possible? - wavesource - Jun 5th, 2011 Hi Ben Thanks for that - I'll set it and we'll see what happens. Will report back. D Yep, that's a goal - works great. Thanks again, Ben RE: Field option groups - checkbox - different delimiter possible? - Ben - Jun 9th, 2011 Good to hear! ![]() - Ben |