function getDynamicFields()
 {
     if (!isset($this->id)) {
         return array();
     } elseif (!$this->_dfields) {
         $this->_dfields = DynamicFormField::objects()->filter(array('form_id' => $this->id))->all();
         foreach ($this->_dfields as $f) {
             $f->setForm($this);
         }
     }
     return $this->_dfields;
 }
 function delete()
 {
     $fields = DynamicFormField::objects()->filter(array('type' => 'list-' . $this->id))->count();
     if ($fields == 0) {
         return parent::delete();
     } else {
         // Refuse to delete lists that are in use by fields
         return false;
     }
 }