configure($properties); } /*This method encapsulates the various pieces that are included in an element's label.*/ protected function renderLabel($element) { $label = $element->getLabel(); $id = $element->getID(); $description = $element->getDescription(); if(!empty($label) || !empty($description)) { echo '
'; if(!empty($label)) { echo ''; } if(!empty($description)) echo '', $description, ''; echo '
'; } } /*Render inline error messages for an element with proper ARIA support*/ protected function renderInlineError($element) { $errors = $element->getErrors(); $errorID = $element->getErrorID(); if(!empty($errors) && !empty($errorID)) { echo ''; } } public function setForm(Form $form) { $this->form = $form; } /*jQuery is used to apply css entries to the last element.*/ public function jQueryDocumentReady() { echo 'jQuery("#', $this->form->getId(), ' .pfbc-element:last").css({ "margin-bottom": "0", "padding-bottom": "0", "border-bottom": "none" });'; } public function render() {} public function renderCSS() { $id = $this->form->getId(); /*For ease-of-use, default styles are applied to form elements.*/ if(!in_array("style", $this->form->getPrevent())) { echo <<