addElement('radio', 'useSurcharge', [ 'label' => 'Would you like to add a Premium to the licensing fee?', 'multiOptions' => $this->getConfigArray('yesNoOptions'), 'required' => true, 'separator' => '   ', ]); $this->addElement('numeric', 'surcharge', [ 'label' => 'Premium ($)', 'required' => ($this->_getData('useSurcharge') == 'y') ]); $this->getElement('surcharge')->getDecorator('Label')->setOption('style', 'display: none;'); $this->getElement('surcharge')->getDecorator('HtmlTag')->setOption('style', 'display: none;'); $this->getElement('surcharge')->getDecorator('Label')->setOption('class', 'required'); return $this; } }