QuickForm data transfer
| From: | Alexey Mirkulove | Date: | Fri, 02 Apr 2004 11:43:32 +0000 |
| Subject: | QuickForm data transfer | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-11584@lists.php.net to get a copy of this message | ||
Greetings!
In the QuickForm is it possible to send values of fields as key values?
For ex.:
<?php
require_once 'HTML/QuickForm.php';
$form = new HTML_QuickForm('Time table');
$y=5;
$x="00";
while ($y<22){
$timex[$z]=$y . ":" . $x;
if ($x=="30"){$y=$y+1;$x="00";} else {$x="30";}
$z++;
}
$Stime = &HTML_QuickForm::createElement('select', 'stime' ,''
, $timex);
$Etime = &HTML_QuickForm::createElement('select', 'etime' ,''
, $timex);
$Butt[] = &HTML_QuickForm::createElement('submit','null',
'enter');
$Butt[] = &HTML_QuickForm::createElement('reset','null',
'reset');
$form->addElement('header', null, 'Time Table');
$form->addGroup(array($Stime, $Etime), 'TimeEx' , "÷ÒÅÍÑ: Ó" ,"
ÄÏ " );
$form->addGroup($Butt, null, null, ' ');
$form->applyFilter('__ALL__', 'trim');
if ($form->validate()) {
echo "";
}
$form->display();
?>
IT WILL DISPLAY:
array(1) {
["TimeEx"]=>
array(2) {
["stime"]=>
string(1) "3"
["etime"]=>
string(2) "10"
}
BUT I WANT TO SEE INSTEAD:
}
array(1) {
["TimeEx"]=>
array(2) {
["stime"]=>
string(1) "6:30"
["etime"]=>
string(2) "10:00"
}
}
Thanks, Best Regards
Alexey Merkulov