QuickForm - problem with addElement('header')

From: Date: Thu, 10 Jul 2003 13:18:52 +0000
Subject: QuickForm - problem with addElement('header')
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-6550@lists.php.net to get a copy of this message
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()) { }

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