getElement(); $options = array( 'mDec' => $element->getPrecision(), 'aNeg' => ($element->getNegative()) ? '-' : '', 'aSep' => $element->getGroup(), 'aDec' => $element->getDecimal(), ); /** @var $doc Qs_Doc */ $doc = Zend_Registry::get('doc'); $doc->addScript('js/jquery-autoNumeric.js') ->addInitFunction('$("#' . $element->getId() . '").autoNumeric', array($options)); return $this; } /** * @param Qs_Form_Element_Numeric $element * @return null|string */ public function getValue($element) { $value = parent::getValue($element); if (null !== $value) { $value = number_format( (float) $value, $element->getPrecision(), $element->getDecimal(), $element->getGroup() ); } return $value; } }