function theme_tripal_field_default

3.x tripal.fields.inc theme_tripal_field_default($variables)

Theme function for all TripalFieldWidget objects.

Parameters

$variables:

1 theme call to theme_tripal_field_default()
TripalFieldWidget::form in tripal/includes/TripalFields/TripalFieldWidget.inc
Provides the form for editing of this field.

File

tripal/includes/tripal.fields.inc, line 926

Code

function theme_tripal_field_default($variables) {
  $element = $variables['element'];
  $field = $element['#field'];
  $instance = $element['#instance'];
  $widget_class = $element['#field_name'] . '_widget';
  $langcode = $element['#language'];
  $delta = $element['#delta'];
  tripal_load_include_field_class($widget_class);
  if (class_exists($widget_class)) {
    $widget = new $widget_class($field, $instance);
    return $widget->theme($element);
  }
}