You are here

function asin_autocomplete_process in Amazon Product Advertisement API 6

Process an autocomplete widget.

1 string reference to 'asin_autocomplete_process'
asin_elements in asin/asin.module
Implementation of FAPI hook_elements().

File

asin/asin.module, line 387
Defines a field type for referencing an Amazon product.

Code

function asin_autocomplete_process($element, $edit, $form_state, $form) {
  $element = asin_text_process($element, $edit, $form_state, $form);
  $asin_key = $element['#columns'][0];
  $element[$asin_key]['#autocomplete_path'] = 'asin/autocomplete';
  $element[$asin_key]['#element_validate'][] = 'asin_autocomplete_validate';
  $element[$asin_key]['#maxlength'] = 256;
  return $element;
}