Example #1
0
 public function addControl($key, Miao_Form_Control $control)
 {
     $newControl = clone $control;
     $newControl->setValue(null);
     $controlName = $control->getName();
     $name = $this->_makeName($key, $controlName);
     $newControl->setName($name);
     $this->_controlList[$controlName] = $newControl;
     return $this;
 }
Example #2
0
 public function __construct($name, array $attributes = array(), $url = null)
 {
     if (empty($url)) {
         $url = '/?_prefix=Miao_Office&_action=KCaptcha';
     }
     $this->_url = $url;
     parent::__construct($name, $attributes);
     $this->addValidator('KCaptcha');
 }
Example #3
0
 public function __construct($id, array $attributes = array(), $items = array())
 {
     parent::__construct($id, $attributes);
     $this->setItems($items);
 }
Example #4
0
 protected function _makeName($key)
 {
     $controlName = $this->_prototype->getName();
     $name = sprintf('%s[%s]', $controlName, $key);
     return $name;
 }
Example #5
0
 public function __construct($id, $action = '/', array $attributes = array())
 {
     $this->_exceptAttrMap = array('id', 'method', 'action', 'enctype');
     $this->setAction($action);
     parent::__construct($id, $attributes);
 }
Example #6
0
 public function addControl(Miao_Form_Control $control)
 {
     $this->_controlPrototypeList[$control->getName()] = $control;
     return $this;
 }