function theme_uc_extra_fields_pane_checkout_pane in Extra Fields Checkout Pane 6.2
Theme the extra fields forms on the checkout page.
Parameters
array $form:
Return value
string
File
- includes/
theme.inc, line 13 - Theme functions for the panes
Code
function theme_uc_extra_fields_pane_checkout_pane($form) {
$req = '<span class="form-required">*</span>';
$output = '<div class="uc-extra-fields-pane-table address-pane-table"><table>';
foreach (element_children($form) as $field) {
if ($form[$field]['#type'] != 'hidden') {
$title = $form[$field]['#title'];
unset($form[$field]['#title']);
$output .= '<tr><td class="field-label">';
if ($form[$field]['#required']) {
$output .= $req;
}
if (!empty($title)) {
// Add title with colon only if title is not empty
$output .= '<strong>' . $title . ':</strong>';
}
$output .= '</td><td>' . drupal_render($form[$field]) . '</td></tr>';
}
}
$output .= '</table></div>';
foreach (element_children($form) as $element) {
$output .= drupal_render($form[$element]);
}
return $output;
}