Re: QuickForm - problem with addElement('header')

From: Date: Thu, 10 Jul 2003 16:57:30 +0000
Subject: Re: QuickForm - problem with addElement('header')
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6551@lists.php.net to get a copy of this message
Cody - the 'header' type is not an HTML form element -- just text displayed on your page. Try 'text' instead. Try $form->freeze() to see the values only -- no input boxes. Have a look at the supported element types in [your_path_to_pear]/pear/HTML/QuickForm.php hth Graham At 08:18 AM 7/10/2003 -0500, Cody Green wrote:
I am having a problem with my form. I am querying a database and storing the values into an array $data. I then set up a form to use the $data array for some of its values. The actual parts of the form retain there values when the form is submitted and starts to go though validation but the headers don't remember their values. I don't have any validation happening right now, I'm just sending the form back to the page to see the values stored in the $_POST variable. Any help would be greatly appreciated. Thanks, Cody Here is a sample of my code. $form->addElement('header', 'submitted_by', $data[0]['submitted_by']); $form->addElement('header', 'entered_by', $data[0]['entered_by']); $form->addElement('header', 'date_entered', $data[0]['date_entered']); $form->addElement('header', 'problem', nl2br($data[0]['problem'])); $form->addElement('select','status','Status:', array('open'=>'Open', 'wait_csg'=>'Waiting on CSG', 'wait_user'=>'Waiting on User','hold'=>'Hold','canceled'=>'Canceled','closed'=>'Closed')); $form->addElement('select','priority','Priority:', array('normal'=>'Normal', 'high'=>'High', 'low'=>'Low')); $form->addElement('textarea', 'comment','Comment:','rows="6" cols="30"'); $form->addElement('text', 'time_spent', 'Time Spent:','size="2"'); $form->addElement('reset', 'reset', 'Reset'); $form->addElement('submit', 'submit', 'Update Task'); // Validation rules // Validate form if ($form->validate()) { } -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Graham Clarke GrahamC@53Tech.com www.53Tech.com 603.643.9955

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