0

We create a input field using user interface for add multiple languages .How i can add multiple language using comma separate so after comma they will populate other language.

1 Answer 1

-1

You need to explode the string inside the autocomplete function.

function autocomplete_callback($string) {
  $explode_str = explode(',', $string);
  $last_str = drupal_strtolower(array_pop($explode_str));
  // use $last_str in the query
  $explode_str[] = $result;
  return implode($explode_str);
}
5
  • so can i copy paste them into autocomplete.module file Feb 9, 2015 at 11:08
  • You need to change in query/validation/submit function. Feb 9, 2015 at 11:13
  • Is that any module to add multiple value on single textbox via comma separated Feb 9, 2015 at 11:15
  • You can check example code of core taxonomy module. Check hook_menu in taxonomy.module. Feb 9, 2015 at 11:17
  • ok, i will try. Feb 9, 2015 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.