/** * Add a single element to the form * * @param $element iPhorm_Element The element to add */ public function addElement(iPhorm_Element $element) { $this->_elements[$element->getName()] = $element; if ($element instanceof iPhorm_Element_Date && $element->getShowDatepicker()) { $this->_hasDatepickerElement = true; } if ($element->getLogic() && count($element->getLogicRules())) { $this->_hasConditionalLogic = true; $this->_conditionalLogicElementIds[] = $element->getId(); foreach ($element->getLogicRules() as $rule) { $this->_conditionalLogicDependentElementIds[] = (int) $rule['element_id']; } } }