/** * 构造函数 * * @param string $id * @param string $action * @param string $method * @param arary $props */ function __construct($id = 'form1', $action = null, $method = 'post', array $props = null) { parent::__construct($id, 'form', $props); $this->action = $action; $this->method = $method; $this->_is_root_group = true; }
/** * 构造函数 * * 表单对象构造后,会调用 _after_created() 方法。 * QForm 继承类可以在 _after_created() 方法中做进一步的设置和初始化。 * * @param string $id 表单 ID * @param string $action 表单提交的目的地 URL * @param string $method 表单提交方法 * @param arary $attrs 附加的属性 */ function __construct($id = 'form1', $action = null, $method = self::POST, array $attrs = null) { parent::__construct($id, $attrs); $this->action = $action; $this->method = $method; $this->enctype = self::ENCTYPE_URLENCODED; $this->_after_created(); }