On this page
function profile_admin_settings_autocomplete
profile_admin_settings_autocomplete($string)
Retrieve a pipe delimited string of autocomplete suggestions for profile categories
File
- modules/profile/profile.admin.inc, line 434
- Administrative page callbacks for the profile module.
Code
function profile_admin_settings_autocomplete($string) {
$matches = array();
$result = db_select('profile_field')
->fields('profile_field', array('category'))
->condition('category', db_like($string) . '%', 'LIKE')
->range(0, 10)
->execute();
foreach ($result as $data) {
$matches[$data->category] = check_plain($data->category);
}
drupal_json_output($matches);
}
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/modules!profile!profile.admin.inc/function/profile_admin_settings_autocomplete/7.x