Thanks Adam! Your solution works great.
On Mon, Sep 8, 2008 at 3:14 PM, Adam Hunter
<ah125i@...> wrote:
Hi,
This is because Zend_Form render's through Zend_View's helpers. This escapes form values by default. I use (in my controller) $this->view->setEscape('stripslashes'). This way your form values won't be converted to HTML Entities. From inside your form class you can do $this->getView()->setEscape('stripslashes').
Hope this helps.
AdamOn Mon, Sep 8, 2008 at 8:36 AM, Pieter
<ptrwrsm@...> wrote:
Hi everyone,
quick question; I am trying to create a dropdown box with all the country codes and names. The problem is, however, that many of these countries need html entities (as they contain umlauts, accent graves etcetera). If I use html entities like ë it will be converted by zend_form to &uml;
Does anyone know how to circumvent this?
Sample code:
$this->addElement('select', 'country', array(
'validators' => array(
array(
'regex', false, array('/^[A-Z]{2}$/',
),
),
'label'=>'Land:',
'required' => true,
'multiOptions' => array(
'AF'=>'Afghanistan','AL'=>'Albanië','DZ'=>'Algerije','AS'=>'Amerikaanse Samoa','AD'=>'Andorra','AO'=>'Angola','AI'=>'Anguilla',
),
'decorators' => $this->elementDecorators
));
Thanks for helping!
Regards,
Pieter