function profile_admin_settings_autocomplete
Retrieve a pipe delimited string of autocomplete suggestions for profile categories
1 string reference to 'profile_admin_settings_autocomplete'
- profile_menu in modules/
profile/ profile.module - Implements hook_menu().
File
-
modules/
profile/ profile.admin.inc, line 434
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);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.