/**
 * Theme form element labels.
 *
 * If element #description (like field help text) is defined,
 *  add it after the label and remove it from the element.
 *  Seems to work.
 *
 * @see theme_form_element_label()
 */
function ctsibamboo_form_element_label($vars)
{
    $output = theme_form_element_label($vars);
    if (!empty($vars['element']['#description'])) {
        $output .= '<div class="description">' . $vars['element']['#description'] . "</div>\n";
        $vars['element']['#description'] = '';
    }
    return $output;
}
Esempio n. 2
0
function gavias_laikafood_form_element_label($vars)
{
    //unset($vars['element']['#id']);
    switch ($vars['element']['#type']) {
        case 'date':
        case 'webform_time':
            unset($vars['element']['#id']);
        default:
            return theme_form_element_label($vars);
    }
}
Esempio n. 3
0
/**
 * Implements theme_form_element_label()
 * Use foundation tooltips
 */
function grameen_foundation_form_element_label($vars)
{
    if (!empty($vars['element']['#title'])) {
        $vars['element']['#title'] = '<span class="secondary label">' . $vars['element']['#title'] . '</span>';
    }
    if (!empty($vars['element']['#description'])) {
        $vars['element']['#description'] = ' <span class="has-tip tip-top radius" data-width="250" title="' . $vars['element']['#description'] . '">' . t('More information?') . '</span>';
    }
    return theme_form_element_label($vars);
}