FormBuilder DataObject configuration issue

From: Date: Thu, 28 Sep 2006 13:42:32 +0000
Subject: FormBuilder DataObject configuration issue
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-25277@lists.php.net to get a copy of this message
Hello, I have a big problem here: some fields in my DO are FK to thousands of records, I've already setup a convenient filter to enter data, but when I want to display them in a frozen form it obviously takes forever to render. This is useless since I already know which particular value I want to show for the FK field. I thought about setting userEditableFields to array() and then checking if the field is frozen (=userEditable) before calling getSelectOptions() but the funcion _getUserEditableFields() has a check that returns false for an empty $this->userEditableField array It is like this, function _getUserEditableFields() { // if you don't want any of your fields to be editable by the user, set fb_userEditableFields to // "array()" in your DataObject-derived class if ($this->userEditableFields) { return $this->userEditableFields; } would'nt be better to check for array type, like this? function _getUserEditableFields() { // if you don't want any of your fields to be editable by the user, set fb_userEditableFields to // "array()" in your DataObject-derived class if (is_array($this->userEditableFields)) { return $this->userEditableFields; } Additionally, maybe we could also check if the field is editable before calling getSelectOptions() around line 1200 of FormBuilder.php. Any hint, suggestion? -- Alessandro Pasotti itOpen - "Open Solutions for the Net Age" w3: www.itopen.it Linux User# 167502

« previous php.pear.general (#25277) next »