[prev in list] [next in list] [prev in thread] [next in thread] 

List:       pear-general
Subject:    [PEAR] Quickform having strange behaviours
From:       lorim <lorimz () gmail ! com>
Date:       2006-02-27 15:55:17
Message-ID: 7d0567580602270755n17528b62p () mail ! gmail ! com
[Download RAW message or body]


hello, i'm setting up a form with a simple text field and some advcheckboxes
with value and description taken from a db:

foreach ($descrizione as $chiave => $valore) {
$nome[$counter] = 'tipologia_'.$counter;
$prova =&
HTML_QuickForm::createElement('advcheckbox',$nome[$counter],'',$valore,null,$chiave);
$form->addElement($prova);
$tmp = $prova->getChecked();
$test[$chiave] = $tmp;
}
$_POST['test'] = $test;

maybe this is not the best code to use, but it works on my pc at home (win
xp sp1, php 5.1.2, HTML_Quickform 3.5.2-cvs) while it not works at
univerisity (linux, php 5.0.4, HTML_Quickform 3.5.2-cvs)

this is the var_dump of $descrizione ON MY PC:

array(4) {
  [2]=>
  string(3) "bla"
  [5]=>
  string(6) "cascon"
  [3]=>
  string(6) "fefefe"
  [1]=>
  string(4) "snow"
}

and this is the var_dump AT UNIVERSITY:

string(6) "asbf c"

i don't know what the problem is... i've got the same problem when
using groups... looking into HTML/QuickForm/group.php i've found
that the problem is in the onQuickFormEvent function which simply
freeze when the form is submitted, or calls wrong addElement
(in facts, it builds up a string instead of an array of objects)

any suggestion?

thanks, lorim.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic