PEAR is discontinued

This is a static archive preserving historical releases and metadata. No new packages or updates will be published. For updates to existing packages, or to publish new packages, please use Composer and Packagist.

Home » Database » DB_DataObject_FormBuilder » Bug #1696

userEditableFields seems not to work

Details

Submitted2004-06-21 19:14 UTC
Fromtobias dot nix at web dot de
Assignedjustinpatrin
StatusClosed
PackageDB_DataObject_FormBuilder
PHP VersionIrrelevant
OSdebian
Roadmaps(Not assigned)

Comments

[2004-06-21 19:14 UTC] tobias dot nix at web dot de

Description:
------------
I defined a variable userEditableFields in my
DataObject derivated class like this:

var $userEditableFields = array('lastmodified');

The field is still displayed in the form.

Expected result:
----------------
Field has to be hidden or complete away in the form.

Actual result:
--------------
Field is displayed.

[2004-06-21 20:03 UTC] tobias dot nix at web dot de

thanks for the quick respond.

ok. my bugreport was not very clear.
I expected a frozen field, but
$userEditableFields has no effect.

So the field is still editable.

[2004-06-21 20:58 UTC] tobias dot nix at web dot de

I defined userEditableFields with only those
fields which should be editable.

here is a link to the source & sql file:
http://paupau.org/phps/Article.phps
http://paupau.org/phps/mysql.sql

first i defined the order to render and second
the fields i want to see editable.

var $preDefOrder = array('category_id', 'author_id', 'added', 'lastmodified', 'isdraft', 'subject', 'body');
var $userEditableFields = array('added', 'isdraft', 'subject', 'body');

other notes:
- Fields that are not defined in preDefOrder are also not displayed.
- is postGenerateForm the right function to setDefaults of Quickform? the date is always (after submit/load) set to default, but correct saved in db.