profile_admin_settings_autocomplete

Versions
5 – 7
profile_admin_settings_autocomplete($string)

Retrieve a pipe delimited string of autocomplete suggestions for profile categories

Code

modules/profile/profile.admin.inc, line 422

<?php
function profile_admin_settings_autocomplete($string) {
  $matches = array();
  $result = db_query_range("SELECT category FROM {profile_field} WHERE LOWER(category) LIKE LOWER(:category)", 0, 10, array(':category' => $string . '%'));
  foreach ($result as $data) {
    $matches[$data->category] = check_plain($data->category);
  }
  drupal_json_output($matches);
}
?>
Login or register to post comments
 
 

All source code and documentation on this site is released under the terms of the GNU General Public License, version 2 and later. Drupal is a registered trademark of Dries Buytaert.