function output_element($element) { if ('fieldset' == $element->getType()) { output_fieldset($element); } elseif ('hidden' == $element->getType()) { echo '<div style="display: none;">' . $element->__toString() . "</div>\n"; } else { echo '<div class="qfrow"><label class="qflabel" for="' . $element->getId() . '">' . $element->getLabel() . '</label> <div class="qfelement">' . $element->__toString() . "</div></div><br />\n"; } }
function output_element($element) { if ('fieldset' == $element->getType()) { output_fieldset($element); } elseif ('hidden' == $element->getType()) { echo '<div style="display: none;">' . $element->__toString() . "</div>\n"; } else { $required = $element->isRequired(); $error = $element->getError(); echo '<div class="qfrow"><label class="qflabel" for="' . $element->getId() . '">' . ($required ? '<span class="required">*</span>' : '') . $element->getLabel() . '</label> <div class="qfelement' . (strlen($error) ? ' error' : '') . '">' . (strlen($error) ? '<span class="error">' . $error . '</span><br />' : '') . $element->__toString() . "</div></div><br />\n"; } }