You are here

function asset_wizard_textfield2 in Asset 6

Same name and namespace in other branches
  1. 5.2 asset_wizard.module \asset_wizard_textfield2()

The #process callback function for the textfield

File

./asset_wizard.module, line 221
Wizard-style interface for Asset.

Code

function asset_wizard_textfield2($element) {
  $config = asset_wizard_get_config($element['#asset_config']);
  if ($config['return type'] == 'macro') {
    return asset_wizard_textarea($element);
  }
  elseif ($config['return type'] == 'id') {

    //    $output = theme('asset_wizard_textarea_link', $element);
    //    $element['#field_suffix'] .= $output;
    $preview = theme('asset_wizard_textfield_preview', $element);
    $element['#field_prefix'] .= '<div class="clear-block"><div class="asset-textfield-preview">' . $preview . '</div>';
    $element['#field_suffix'] .= '</div>';
  }
  return $element;
}