Re: QuickForm installer bug? + Can't display values

From: Date: Fri, 31 May 2002 17:31:31 +0000
Subject: Re: QuickForm installer bug? + Can't display values
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-1552@lists.php.net to get a copy of this message
At 10:09 AM 5/31/2002 +0200, you wrote: >le 31/05/02 2:21, Sergio Tirado à stirado@campus.gym.itesm.mx a écrit : > >> Once that was working, I found some problems with one of the two >> examples included. I had to comment out a few lines related to >> <select> and form validation to get it working. > >Which example are you talking about ? 1 or 2 ? Example 1. I had to comment out this lines: //$select = &$form->getElement('iselTest'); //$select->setSize(5); //$select->setMultiple(true); >> Despite all that, I started playing with it and looks great too, however, >> once I made the form I wanted, I can use it to get values from it but >> I haven't found a way to get it to display values I have retrieved from >> a database. ¿Could someone tell me how to do this? > >Do you use setDefaults ? Look at the example 1. Right now I'm doing this and it shows record info the first time only. require_once("HTML/QuickForm.php"); if ($_POST["action"]=="Add") { $uid = ""; } else { $p_key = "L00263822"; list($uid,$did,$n,$ln) = $u->get($p_key); // Load the record info } $form =& new HTML_QuickForm("$PHP_SELF","POST"); $form->addElement('text', 'frm_uid', "User Id", "size='9', maxlength='9' value='$uid'"); $form->addElement('select', 'frm_did', 'Dept:', array('Admon'=>'A', 'Dirección'=>'B','UIB'=>'C','Prepa'=>'D')); $form->addElement('text', 'frm_n', 'Name:', "size='30', maxlength='30' value='$n'"); $form->addElement('text', 'frm_ap', 'Last name:', "size='30', maxlength='30' value='$ln'"); $form->addElement('submit', 'action', 'Add'); $form->addElement('submit', 'action', 'Remove'); $form->display($body); I tried setDefaults yesterday but it wasn't working. I'll give it a try again and report on results. >What version of php do you use ? php-4.1.2-7. Haven't found php-4.2.1-0.i386.rpm yet. >Can you try to install Auth with pear installer and report if it installs >everything in the same directory or create the container directory as >expected or if it does the same thing as with QuickForm. > >I reported a bug for that yesterday. There's nothing else I can do about it. I installed Auth as you requested [root@www root]# pear install http://pear.php.net/get/Auth install ok: Auth 1.0.2 Under my /usr/share/pear/Auth directory I can see this: [root@www Auth]# ls -l total 48 -rw-r--r-- 1 root root 19238 May 31 09:56 Auth.php -rw-r--r-- 1 root root 2731 May 31 09:56 Container.php -rw-r--r-- 1 root root 8199 May 31 09:56 DB.php -rw-r--r-- 1 root root 3229 May 31 09:56 File.php -rw-r--r-- 1 root root 5695 May 31 09:56 LDAP.php I downloaded and extracted Auth-1.0.2.tgz to see if it had any directories and found this: [root@www Auth]# ls -l Auth-1.0.2 total 32 -rw-r--r-- 1 stirado users 19238 Feb 7 04:07 Auth.php drwxr-xr-x 2 root root 4096 May 31 10:03 Container -rw-r--r-- 1 stirado users 2731 Dec 14 08:58 Container.php -rwxr--r-- 1 stirado users 85 Nov 4 2001 README.Auth [root@www Auth]# ls -l Auth-1.0.2/Container total 24 -rw-r--r-- 1 stirado users 8199 Jan 10 02:40 DB.php -rw-r--r-- 1 stirado users 3229 Dec 14 08:58 File.php -rwxr-xr-x 1 stirado users 5695 Dec 14 08:58 LDAP.php [root@www Auth]# So it did it again: It is not creating sub-directories. >Bertrand Mansion >Mamasam -- Sergio Tirado

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