Changeset 753
- Timestamp:
- 09/04/08 15:30:31 (3 months ago)
- Files:
-
- trunk/lib/Form.php (modified) (2 diffs)
- trunk/lib/Form/Field.php (modified) (1 diff)
- trunk/lib/FreeForm.php (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/lib/Form.php
r748 r753 10 10 */ 11 11 class Form extends AbstractView { 12 pr ivate$form_template = null;13 pr ivate$form_tag = null;12 protected $form_template = null; 13 protected $form_tag = null; 14 14 public $errors=array(); 15 15 // Here we will have a list of errors occured in the form, when we tried to submit it. … … 19 19 // Those templates will be used when rendering form and fields 20 20 21 pr ivate$data = array(); // This array holds list of values prepared for fields before their initialization. When fields21 protected $data = array(); // This array holds list of values prepared for fields before their initialization. When fields 22 22 // are initialized they will look into this array to see if there are default value for them. 23 23 // Afterwards fields will link to $this->data, so changing $this->data['fld_name'] would actually trunk/lib/Form/Field.php
r748 r753 242 242 return "<$tag ".join(' ',$tmp).$postfix.">".($value?$value."</$tag>":""); 243 243 } 244 } 245 246 247 class Form_Field_Free extends Form_Field{ 248 function init(){ 249 parent::init(); 250 // free field template is the whole content of its tag 251 //$this->content=$this->owner 252 } 253 function render(){ 254 $this->template->trySet('value',$this->get()); 255 $this->output($this->template->render()); 256 } 244 257 } 245 258
