Comments

duellj’s picture

Status: Active » Needs review

I think a simple comment notifying users that they should use an autocomplete field instead will suffice, unless you think we should rewrite the form field definition.

Upgrade routine:

/**
 * Implements hook_upgrade_call_taxonomy_form_all_alter().
 */
function coder_upgrade_upgrade_call_taxonomy_form_all_alter(&$item, &$reader) {
  // Create helper objects.
  $editor = PGPEditor::getInstance();

  $item->insertStatementBefore($editor->commentToStatement('// TODO taxonomy_form_all has been removed, use an autocomplete field instead.'));
}

Test function:

function example_taxonomy_form_all() {
  $form = array();

  $form['term'] = array(
    '#type' => 'select',
    '#title' => t('Term'),
    '#options' => taxonomy_form_all(),
    '#description' => t('Select a term to apply to the node. Keep in mind that the selected product node type must have the selected vocabulary enabled.'),
    '#default_value' => $settings['term'],
  );

  $terms = taxonomy_form_all();
  if ($terms) {
    $form['term'] = array(
      '#type' => 'select',
      '#title' => t('Term'),
      '#options' => $terms,
      '#description' => t('Select a term to apply to the node. Keep in mind that the selected product node type must have the selected vocabulary enabled.'),
      '#default_value' => $settings['term'],
    );
  }
  return $form;
}
solotandem’s picture

Assigned: Unassigned » solotandem
Status: Needs review » Fixed

Implemented in next dev release. Added code to replace the function call with 'array().'

Status: Fixed » Closed (fixed)
Issue tags: -Intermediate

Automatically closed -- issue fixed for 2 weeks with no activity.