0

I have the following piece of code:

// agregamos el campo de fecha de nacimiento
$this->direccion = new Zend_Form_Element_Text('direccion');
$this->direccion->setLabel('Dirección:');
$this->direccion->setAttrib('escape', false);
$this->direccion->getDecorator('Label')->setOption('escape',false);
$this->direccion->setRequired(true);
$this->addElement($this->direccion);

For some reason, while trying to setValue() to "Larrañaga", the content is escaped, and nothing is shown in the input's value. Note that setAttrib('escape', false) is applied to the element, as suggested in several posts.

Any idea? Thanks!

1 Answer 1

2

Add this line into your init() method:

$this->getView()->setEscape('stripslashes');
Sign up to request clarification or add additional context in comments.

1 Comment

@JoaquínL.Robles Glad to help you ;)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.