/** * Lays out the row for the input, including label and errors * @param EE_Form_Input_Base $input * @return string */ public function layout_input($input) { $html = ''; if ($input instanceof EE_Hidden_Input) { $html .= EEH_HTML::nl() . $input->get_html_for_input(); } else { if ($input instanceof EE_Submit_Input) { $html .= EEH_HTML::div($input->get_html_for_input(), $input->html_id() . '-submit-dv', $input->html_class() . '-submit-dv'); } else { if ($input instanceof EE_Select_Input) { $html .= EEH_HTML::div(EEH_HTML::nl(1) . $input->get_html_for_label() . EEH_HTML::nl() . $input->get_html_for_errors() . EEH_HTML::nl() . $input->get_html_for_input() . EEH_HTML::nl() . $input->get_html_for_help(), $input->html_id() . '-input-dv', $input->html_class() . '-input-dv'); } else { if ($input instanceof EE_Form_Input_With_Options_Base) { $html .= EEH_HTML::div(EEH_HTML::nl() . $this->_display_label_for_option_type_question($input) . EEH_HTML::nl() . $input->get_html_for_errors() . EEH_HTML::nl() . $input->get_html_for_input() . EEH_HTML::nl() . $input->get_html_for_help(), $input->html_id() . '-input-dv', $input->html_class() . '-input-dv'); } else { $html .= EEH_HTML::div(EEH_HTML::nl(1) . $input->get_html_for_label() . EEH_HTML::nl() . $input->get_html_for_errors() . EEH_HTML::nl() . $input->get_html_for_input() . EEH_HTML::nl() . $input->get_html_for_help(), $input->html_id() . '-input-dv', $input->html_class() . '-input-dv'); } } } } return $html; }
/** * Displays the help span for the specified input * @param EE_Form_Input_Base $input * @return string */ public function display_help_text($input) { if ($input->html_help_text() != '') { $tag = is_admin() ? 'p' : 'span'; return '<' . $tag . ' id="' . $input->html_id() . '-help" class="' . $input->html_help_class() . '" style="' . $input->html_help_style() . '">' . $input->html_help_text() . '</' . $tag . '>'; } return ''; }