/** * Gets the HTML for the label tag and its contents for the input * @param EE_Form_Input_Base $input * @return string */ public function display_label($input) { $class = $input->required() ? 'ee-required-label ' . $input->html_label_class() : $input->html_label_class(); $label_text = $input->required() ? $input->html_label_text() . '<span class="ee-asterisk">*</span>' : $input->html_label_text(); return '<label id="' . $input->html_label_id() . '" class="' . $class . '" style="' . $input->html_label_style() . '" for="' . $input->html_name() . '">' . $label_text . '</label>'; }