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.

0

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);
}
  • so can i copy paste them into autocomplete.module file – Swapnil0226 Feb 9 '15 at 11:08
  • You need to change in query/validation/submit function. – Sumit Madan Feb 9 '15 at 11:13
  • Is that any module to add multiple value on single textbox via comma separated – Swapnil0226 Feb 9 '15 at 11:15
  • You can check example code of core taxonomy module. Check hook_menu in taxonomy.module. – Sumit Madan Feb 9 '15 at 11:17
  • ok, i will try. – Swapnil0226 Feb 9 '15 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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