Wednesday 15 June 2011

php - how to use selected option of form select element in zend framework2? -


I am selecting Zend \ Form \ View \ Helper \ Form and how to set selected values ​​in the selected element did not get . ('please select ...'), $ this-> (common) -> getCountryList ()) ; $ Country & gt; SetValueOptions ($ countryList); $ Country- & gt; Set val (array ('at' = & gt; 'AUSTRIA')); Select echo $ - this-> form ($ country);

  $ country-> Set val ('at'); As above, you can use setValue () to select 'AT'.    

No comments:

Post a Comment