$this->cleaned_data[$name] = $value;
}
} catch (IPF_Exception_Form $e) {
- if (!isset($this->errors[$name])) $this->errors[$name] = array();
+ if (!isset($this->errors[$name]))
+ $this->errors[$name] = array();
$this->errors[$name][] = $e->getMessage();
+
if (isset($this->cleaned_data[$name])) {
unset($this->cleaned_data[$name]);
}
<?php
-class IPF_Form_Widget
+abstract class IPF_Form_Widget
{
public $is_hidden = false;
public $needs_multipart_form = false;
$this->attrs = $attrs;
}
- public function render($name, $value, $extra_attrs=array())
- {
- throw new IPF_Exception('Not Implemented.');
- }
+ public abstract function render($name, $value, $extra_attrs=array());
public function extra_js()
{