Looks like a bug with Smarty

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi All,

I using html_options smarty tag to output an associative array in select
drop down.
Here a sample associative array:

array(5) {
  ["CN-PEK-KEJ"]=>
  array(1) {
    [198]=>
    string(7) "TechTst"
  }
  ["IE-DUB-GAS"]=>
  array(2) {
    [177]=>
    string(10) "store room"
    [39]=>
    string(10) "TechStop 2"
  }
  ["UK-LON-BEL"]=>
  array(1) {
    [88]=>
    string(16) "TechStop-LON-BEL"
  }
  ["IE-DUB-GOR"]=>
  array(1) {
    [159]=>
    string(10) "TechStop 1"
  }
  ["US-NYC-9TH"]=>
  array(1) {
    [194]=>
    string(12) "TestTechStop"
  }
}


and the syntax I have used to output this was:
{html_options name='locationId' options=$locations
selected=$selectedLocation}
where in I assign $selectedLocation with one of the options after selecting
them.

Even after everything being right, the option thats been selected is not set
but it again goes back to show the first option after submit.

Looks like either smarty misinterprets this selected option or is there
something wrong from my end.

Cheers
-- 
Mark is on the way to make a Mark in your hearts

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux