Hi everyone !
I've had a problem with a dojo form, using dojo's SimpleTextArea. Actually the
bug is I only get a textarea, but not the benefits of the SimpleTextArea in
dojo (the box auto-grows when users types return characters) ;
The thing I don't understand is than when I use a dojo simple text area on the
same page, it works normally. I'd like to use it through the Zend framework
though, so if anyone has an idea of the problem I'd be really out of pain.
Here's my form :
class MatterCreation extends Zend_Dojo_Form
{
public function init()
{
Zend_Dojo::enableForm($this);
$this->setName('form');
$this->setAction('/new')
->setMethod('post');
$this->addElement(
'SimpleTextarea',
'simpletextarea',
array(
'label' => 'SimpleTextarea',
'required' => true,
'style' => 'width: 100px; height: 50px;'
)
);
}
}
Ok, now here's my page :
<?php $this->dojo()->javascriptCaptureStart(); ?>
dojo.require("dijit.form.Textarea");
<?php $this->dojo()->javascriptCaptureEnd(); ?>
// Simple text area won't work here !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<?php
if(!isset($this->errors))
{
echo $this->form;
}
else { echo $this->errors; }
?>
<!-- // BUT IT DOES WORK PERFECTLY IF I ADD THIS, WTF !!!
<textarea id="textarea2" name="textarea2" dojoType="dijit.form.Textarea"
style="width:200px; background-image:none;">
d
</textarea>
-->
Thanks guys for any tips on how to solve this !
--
My zend framework experience... the good, the bad
http://myzendframeworkexperience.blogspot.com/
_________________________________________________________________
Votre messagerie et bien plus où que vous soyez. Passez à Windows Live Hotmail,
c'est gratuit !
https://signup.live.com/signup.aspx?id=60969