zend framework - setting a default value in a dojo filteringselect -


I am trying to select filter using the Zend Framework, with the dojo enabled form. This form allows the user to update their profile such as address, URL etc. for their profile. Although elements in the form are using a filiteringselect for things such as country and state / county.

I want to get it in default with this value, when I am populating it, not working.

I'm populating as such

  $ form-> GetElement ('country') - & gt; Set val ($ country);  

$ The country will be priced like United Kingdom, France, Spain etc.

These values ​​are stored in [ID] in the database, [name ]. Used by element in Z form

  $ county = new zend_Dojo_form_element_filteringselect ('county'); $ County-> setriyare (true) - & gt; SetstorID ('countystore') - & gt; Setstore type ('doodetitefileredstore') - & gt; Setstore Perm ('url' = & gt; $ baseUrl. '/ Dojo SetAttrib (' searchAttr ',' name ') - & gt; removeDecorator (' DtDdWrapper ') - & gt; Delete indicator (' label ') - & Gt; removeDecorator ('HtmlTag');  

Although the set value does not work for populate / default. Is there a specific way of doing this with Zend_Forms and Dojo? < / P>

Thank you in advance ...

You can do this directly in the dojo :

  dijit.byId ('myFiltertingSelect'). Entry ('value', newcomer);  

Just add you Should be enabled:

  -> setAttrib ('value', $ newValue)  

Comments

Popular posts from this blog

email - PHP mail error ... failed to open stream : permission denied -

c# - ListView onScroll event -

c - Linux mmap() error -