Re: Quickform: Group of hidden fields

From: Date: Thu, 09 Dec 2004 12:43:00 +0000
Subject: Re: Quickform: Group of hidden fields
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-16141@lists.php.net to get a copy of this message
Solved. sorry for the previous message. Greetings "Pt2002" <pt2002@mail.pt> escreveu na mensagem news:20041209113829.46231.qmail@pb1.pair.com... > Hi > > Thanks to the help of this list I could do what I need to take an older > application to use smarty & html_quickform. > > In the application, there are some forms that read data form a db and edit > that records in a 'grid'. > So far so good. I create a group, validation rules and display and edit > them. To display the form I use smarty section tag. For each record there > is one row in a table. > Now I need to have a hidden field for each record. > I create a group the same way for the others fields. I know there's > something wrong because they are not in the html. > > for ($i=0; $i<count($list); $i++) { > $values[] = &HTML_QuickForm::createElement('text', $i, '', > ''); > > $hiddTest[] = &HTML_QuickForm::createElement('hidden', $i, > '12345'); > // > > $valueRules[$i][] = array('Must be a number', 'numeric', '', > > 'client'); > } > > $form->addGroup($values, 'values', '', ''); > $form->addGroup($hiddTest, 'hiddTest', '', ''); > > In the template I had tried > > {$form_data.hidden} > Inside the section: {$form_data.hiddTest.n} n=0...record count > but none work. > > If I create just one hidden field it's ok. > > Greetings

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