If you add an enclosing div wrapper around the explainfield (since it's got 2 parts), it makes theming much much easier...

Change

      $form[$field['field_name']] = array('#tree' => TRUE);

to:

      $form[$field['field_name']] = array(
      '#tree' => TRUE,
      '#prefix' => '<div id="explainfieldwrapper-'._misc_formize($field['field_name']).'">',
      '#suffix' => '</div>'
      );

That puts a wrapper div around both fields at once, letting you theme/control the layout/etc.

Comments

snufkin’s picture

Thanks for the patches, i'll try test and commit them over the weekend.

snufkin’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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