Re: Calling a function with setDefaults?
| From: | Justin Patrin | Date: | Thu, 07 Dec 2006 23:14:24 +0000 |
| Subject: | Re: Calling a function with setDefaults? | ||
| References: | 1 | Groups: | php.pear.general |
| Request: | Send a blank email to pear-general+get-26015@lists.php.net to get a copy of this message | ||
On 12/7/06, rav k <rav220@hotmail.com> wrote:
Hi I know that I can use setDefault($user) to fill my form with $user info. However how do I actually pass the $user to the setDefault? Eg, at the moment I have a link next to each entry and do a link such as <a href='mypage.php?userid=$userid'></a> but obviously that messes with the forms GET method. What is a better way to pass the userid so that I can get the $user info from the table???Sorry, I don't understand what you're asking. To use setDefaults do something like this: $form->setDefaults(array('userFieldName' => $user)); If you need to pass something with a form's values add a hidden element to the form. -- Justin Patrin