The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
|
Searchable Fields not Searchable - 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: Searchable Fields not Searchable (/showthread.php?tid=379) |
Searchable Fields not Searchable - robidigital - Nov 30th, 2009 I noticed that if I have set a field as searchable in my views, it is not searchable view the "All fields" dropdown unless, the field is also a Column in the view. Has anyone found a workaround for this? RE: Searchable Fields not Searchable - Ben - Dec 1st, 2009 Hey robodigital, I'm glad you posted. I just looked at the code & I think this should be categorized as a usability bug. The "searchable" checkbox on the Add/Edit View pages just mean that it will appear as a searchable column in the fields dropdown in the search bar - nothing more. In fact, the actual form fields that will be searched are just those form fields that show up as columns - as you noted. No good...! How do you think it should work? The "searchable" column should determine both whether they appear in the dropdown & whether they're searchable? I think that makes the most sense... Let me know what you think and I'll include this in a future build. - Ben RE: Searchable Fields not Searchable - robidigital - Dec 3rd, 2009 Here was the solution - 001.Revise admin submission search so that it search searchable fields rather than columns. 1. In /global/code/submissions.php – Above ft_get_submission_field_info function on line 1194, Add Code: /** 2. In /admin/forms/submissions.php - after line 121 Code: $display_fields = ft_get_submission_field_info($view_info["fields"]); add Code: $searchable_fields = ft_get_searchable_field_info($view_info["fields"]); //RBD CUSTOM 001.2 3. In /admin/forms/submissions.php - around line 127 change Code: foreach ($display_fields Code: foreach ($searchable_fields 002.Revise client submission search so that it search searchable fields rather than columns. 1. Completed in 001.1 2. In /client/forms/index.php - after line 125 Code: $display_fields = ft_get_submission_field_info($view_info["fields"]); Code: $searchable_fields = ft_get_searchable_field_info($view_info["fields"]); //RBD CUSTOM 001.2 3. In /client/forms/index.php - around line 130 change Code: foreach ($display_fields Code: foreach ($searchable_fields RE: Searchable Fields not Searchable - Ben - Dec 4th, 2009 Excellent! Thanks for letting me know about the problem - and posting the fix! I'll look it all over and include it in an upcoming build. - Ben RE: Searchable Fields not Searchable - Ben - Dec 10th, 2009 Heya, I've included a fix for this in tonight's build. Turns out it was a pretty deep problem: I had to refactor quite a bit of code to get it working properly. Please let me know of any issues that you - or anyone else - comes across. Thanks! - BEn |