Thanks Matthew - your suggestion works. One of my sources was the article
you wrote at http://devzone.zend.com/article/3450-Decorators-with-Zend_Form
and I was trying to implement the ViewScript as you had it in that article:
Like so:
<h4>Please register with us!</h4>
<form action="<?= $this->escape($this->form->getAction() ?>"
method="<?= $this->escape($this->form->getMethod() ?>">
<fieldset>
<legend>Demographics</legend>
<p>
Please provide us the following information so we can know more
about
you.
</p>
<?= $this->form->age ?>
<?= $this->form->nationality ?>
<?= $this->form->income ?>
</fieldset>
but within the specified viewscript doesn't $this->form become merely $this?
Since in the controller I am passing $this->view->form = $form - I was
assuming that what you had above ($this->form->age) would turn in to
$this->age... I guess I'm a little confused on the scope of some of these
things...
Matthew Weier O'Phinney-3 wrote:
>
> -- edub <[EMAIL PROTECTED]> wrote
> (on Tuesday, 14 October 2008, 12:24 PM -0700):
>> I have read through the forums and tried for several hours now to get a
>> simple viewscript to work - I am still unable to get a form element to
>> render. Hopefully someone can offer some advice:
>
> <snip>
>
>> My orderdetailform.phtml view script:
>> <?php
>> foreach ($this->element as $item) {
>> $item->setView($this);
>> echo "Setting View<br>";
>> }
>> ?>
>> <form>
>> <h2>Order Detail Form</h2>
>> <?php echo $this->ORDER_NUMBER; ?>
>
> Change the above to "$this->element->ORDER_NUMBER". The form is in the
> view script as the "element" property, and you want to grab the element
> ORDER_NUMBER off the form object. (You're already doing that in the
> foreach loop at the top of the view script ;-))
>
>> </form>
>
> --
> Matthew Weier O'Phinney
> Software Architect | [EMAIL PROTECTED]
> Zend Framework | http://framework.zend.com/
>
>
--
View this message in context:
http://www.nabble.com/Zend-Form-ViewScript-Not-Working-tp19980420p19982929.html
Sent from the Zend Framework mailing list archive at Nabble.com.