Welcome to Paster, Anonymous Friend!
Added by anonymous on 2008-10-03 13:17:51 Download/View
  1. if($this->uri->segment(3))
  2. {
  3.         $this->form = new Model_Forms;
  4.         $this->form = $this->form->with('res_form_fields')->get($this->uri->segment(3), 'name');
  5. }
  6. if (count($this->form))
  7. {
  8.         $this->form_data = new stdClass;
  9.         $this->valid_rules = array();
  10.         foreach($this->form as $row)
  11.         {
  12.                 if (!isset($this->form_data->id))
  13.                 {
  14.                         $this->form_data->id = $row->id;
  15.                         $this->form_data->name = $row->name;
  16.                         $this->form_data->email = $row->email;
  17.                         $this->form_data->database = unserialize($row->database);
  18.                 }
  19.                 $this->valid_rules[$row->field_name] = unserialize($row->field_rules);
  20.         }
  21. }
  22.