QuickForm
| From: | Charles Kline | Date: | Thu, 06 Mar 2003 19:33:21 +0000 |
| Subject: | QuickForm | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-4071@lists.php.net to get a copy of this message | ||
Bertrand and others,
How would I go about installing html_quickform when I do not have the ability to use the pear installer?
Thanks
Charles
On Thursday, March 6, 2003, at 09:29 AM, Bertrand Mansion wrote:
<alan@akbkhome.com> wrote :It's probably worth wrapping DataObjects and adding a toArray() or a toQF() method to the new base class - this may be simpler function toQF($key) { foreach($this->_get_table() as $k=>$v) $ret["{$key}[{$k}]"] = $this->$k; } return $ret; } myForm = & new UserForm('update', $dataObject->toQuickForm('user'));Hi Alan, Maybe a generic toArray() method would be nice ? ;) Bertrand Mansion MamasamRegards Alan Demian Turner wrote:-- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.phpHi, I'm trying to integrate Quickform and DB_DataOjbect for a simple UserManager, the problem is how to feed a DB_DataOjbect object to the setDefaults() method in Quickform, so the form can be pre-populated. The form is setup so all the attributes are elements of the array 'user':user[username] user[password], etcso the whole user entity can be cast to an object easily$oUser = (object)$_POST['user']Any DB_DataOjbect will know this is very handy for updating entities:$modUser->setFrom($oUser);The problem I'm having is that a major transform of the entity is necessary to get it into a format compantible with QF. Apologies in advance for the following code, there's probably an easier way of doing this ;-) The question is, is there any interest in creating a setDefaultsFromDataObject() method in Quickform? Two such great packages it seems a shame not to use them in conjunction. cheers, Demian