You are here

function social_link_field_preprocess_field_multiple_value_no_draggable_form in Social Link Field 8

Prepares variables for individual form element templates.

Default template: field-multiple-value-form.html.twig.

Parameters

array $variables: An associative array containing:

  • element: A render element representing the form element.

File

./social_link_field.module, line 38
Module implementing social link field type.

Code

function social_link_field_preprocess_field_multiple_value_no_draggable_form(array &$variables) {
  template_preprocess_field_multiple_value_form($variables);
  unset($variables['table']['#header'][1]);
  unset($variables['table']['#tabledrag']);
  for ($i = 0; $i <= $variables['element']['#max_delta']; $i++) {
    unset($variables['table']['#rows'][$i]['class'][0]);
    unset($variables['table']['#rows'][$i]['data'][2]);
  }
}