
Dave
Staff
/ Moderator

Mar 8, 2010, 4:35 PM
Post #2 of 3
(2328 views)
Shortcut
|
|
Re: [InHouse] Advanced Search Question
[In reply to]
|
Can't Post
|
|
Hi Jayme, It doesn't do that, but I made it do it now. Try this: - open /lib/menus/default/list_functions.php - search for: get fieldschema - Add the code in red:
// get fieldschema for single field searches: $fieldSchema = @$schema[ $fieldnames[0] ]; if ($fieldSchema) { $fieldSchema['name'] = $fieldnames[0]; } // special case: add createdBy.fieldname search functionality if (preg_match("/^createdBy\.(.*?)$/i", $fieldsAsCSV, $matches)) { $name = 'createdByUserNum_match'; $lastValue = @$_REQUEST[$name]; $displayAs = 'dropdown'; $fieldSchema = array( 'name' => '_not_used_', 'optionsType' => 'table', 'optionsTablename' => 'accounts', 'optionsValueField' => 'num', 'optionsLabelField' => $matches[1], ); }
- Go to: Admin > Section Editors > Your Section > Searching (Tab) - Add this to add a search fields by user: Name|createdBy.fullname Hope that helps! Let me know if that works for you. :) Dave Edis - Senior Developer interactivetools.com
|