Zend_Form rendering enhancement proposal

View: New views
7 Messages — Rating Filter:   Alert me  

Zend_Form rendering enhancement proposal

by Matthew Weier O'Phinney-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A number of users have reported that they'd like syntax like the following in Zend_Form:

<table>
    <tr>
        <td><?= $this->form->foo->renderLabel() ?></td>
        <td>
            <?= $this->form->foo->renderElement() ?>
            <?= $this->form->foo->renderDescription() ?>
            <?= $this->form->foo->renderErrors() ?>
        </td>
    </tr>
</table>

The idea is that they would like to selectively render specific metadata
from the element or form.

This could be done fairly easily by using overloading. __call() could
intercept methods beginning in 'render', and if the remainder of the
method matches a decorator, would render that decorator.

I've created an issue to track this, and you can view it at:

    http://framework.zend.com/issues/browse/ZF-3217

Please comment, if you are interested in the idea.

--
Matthew Weier O'Phinney
Software Architect       | matthew@...
Zend - The PHP Company   | http://www.zend.com/

Re: Zend_Form rendering enhancement proposal

by Xavier Vidal Piera :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

A big YES to this idea !

I'm one of those who prefer to place by hand the form elements (although they render by themselves).

On Wed, May 7, 2008 at 2:32 PM, Matthew Weier O'Phinney <matthew@...> wrote:
A number of users have reported that they'd like syntax like the following in Zend_Form:

<table>
   <tr>
       <td><?= $this->form->foo->renderLabel() ?></td>
       <td>
           <?= $this->form->foo->renderElement() ?>
           <?= $this->form->foo->renderDescription() ?>
           <?= $this->form->foo->renderErrors() ?>
       </td>
   </tr>
</table>

The idea is that they would like to selectively render specific metadata
from the element or form.

This could be done fairly easily by using overloading. __call() could
intercept methods beginning in 'render', and if the remainder of the
method matches a decorator, would render that decorator.

I've created an issue to track this, and you can view it at:

   http://framework.zend.com/issues/browse/ZF-3217

Please comment, if you are interested in the idea.

--
Matthew Weier O'Phinney
Software Architect       | matthew@...
Zend - The PHP Company   | http://www.zend.com/



--
Xavier Vidal Piera
Enginyer Tècnic Informàtic de Gestió
Tècnic Especialista Informàtic d'equips
xavividal@...
xvidal@...
http://web.xaviervidal.net
610.68.41.78

Re: Zend_Form rendering enhancement proposal

by Jens Wabnitz-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+1

very helpful in a division of work scenario.


Matthew Weier O'Phinney schrieb:

> A number of users have reported that they'd like syntax like the following in Zend_Form:
>
> <table>
>     <tr>
>         <td><?= $this->form->foo->renderLabel() ?></td>
>         <td>
>             <?= $this->form->foo->renderElement() ?>
>             <?= $this->form->foo->renderDescription() ?>
>             <?= $this->form->foo->renderErrors() ?>
>         </td>
>     </tr>
> </table>
>
> The idea is that they would like to selectively render specific metadata
> from the element or form.
>
> This could be done fairly easily by using overloading. __call() could
> intercept methods beginning in 'render', and if the remainder of the
> method matches a decorator, would render that decorator.
>
> I've created an issue to track this, and you can view it at:
>
>     http://framework.zend.com/issues/browse/ZF-3217
>
> Please comment, if you are interested in the idea.
>
>  


Parent Message unknown Re: Zend_Form rendering enhancement proposal

by Pádraic Brady :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I think it would resolve a few complaints from those who just want to stick HTML around specific points ;).

+1, go for it.
 
Pádraic Brady

http://blog.astrumfutura.com
http://www.patternsforphp.com
OpenID Europe Foundation Member-Subscriber


----- Original Message ----
From: Jens Wabnitz <mailings@...>
To: fw-mvc@...
Sent: Thursday, May 8, 2008 8:55:58 PM
Subject: Re: [fw-mvc] Zend_Form rendering enhancement proposal

+1

very helpful in a division of work scenario.


Matthew Weier O'Phinney schrieb:

> A number of users have reported that they'd like syntax like the following in Zend_Form:
>
> <table>
>    <tr>
>        <td><?= $this->form->foo->renderLabel() ?></td>
>        <td>
>            <?= $this->form->foo->renderElement() ?>
>            <?= $this->form->foo->renderDescription() ?>
>            <?= $this->form->foo->renderErrors() ?>
>        </td>
>    </tr>
> </table>
>
> The idea is that they would like to selectively render specific metadata
> from the element or form.
>
> This could be done fairly easily by using overloading. __call() could
> intercept methods beginning in 'render', and if the remainder of the
> method matches a decorator, would render that decorator.
>
> I've created an issue to track this, and you can view it at:
>
>    http://framework.zend.com/issues/browse/ZF-3217
>
> Please comment, if you are interested in the idea.
>

Pádraic Brady

http://blog.astrumfutura.com
http://www.patternsforphp.com
OpenID Europe Foundation - Irish Representative

Re: Zend_Form rendering enhancement proposal

by Ramon de la Fuente :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+1, that would bring a bit more simplicity back to the freedom that's
already there...


Pádraic Brady wrote:

> I think it would resolve a few complaints from those who just want to
> stick HTML around specific points ;).
>
> +1, go for it.
>  
> Pádraic Brady
>
> http://blog.astrumfutura.com
> http://www.patternsforphp.com
> OpenID Europe Foundation Member-Subscriber <http://www.openideurope.eu/>
>
>
> ----- Original Message ----
> From: Jens Wabnitz <mailings@...>
> To: fw-mvc@...
> Sent: Thursday, May 8, 2008 8:55:58 PM
> Subject: Re: [fw-mvc] Zend_Form rendering enhancement proposal
>
> +1
>
> very helpful in a division of work scenario.
>
>
> Matthew Weier O'Phinney schrieb:
> > A number of users have reported that they'd like syntax like the
> following in Zend_Form:
> >
> > <table>
> >    <tr>
> >        <td><?= $this->form->foo->renderLabel() ?></td>
> >        <td>
> >            <?= $this->form->foo->renderElement() ?>
> >            <?= $this->form->foo->renderDescription() ?>
> >            <?= $this->form->foo->renderErrors() ?>
> >        </td>
> >    </tr>
> > </table>
> >
> > The idea is that they would like to selectively render specific metadata
> > from the element or form.
> >
> > This could be done fairly easily by using overloading. __call() could
> > intercept methods beginning in 'render', and if the remainder of the
> > method matches a decorator, would render that decorator.
> >
> > I've created an issue to track this, and you can view it at:
> >
> >    http://framework.zend.com/issues/browse/ZF-3217
> >
> > Please comment, if you are interested in the idea.
> >
> >
>

Re: Zend_Form rendering enhancement proposal

by aljames :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


+1 for me. It would make my life alot easier. I actually subclassed Zend_Form to do something similar, but I would love to remove my custom code!


Matthew Weier O'Phinney-3 wrote:
A number of users have reported that they'd like syntax like the following in Zend_Form:

<table>
    <tr>
        <td><?= $this->form->foo->renderLabel() ?></td>
        <td>
            <?= $this->form->foo->renderElement() ?>
            <?= $this->form->foo->renderDescription() ?>
            <?= $this->form->foo->renderErrors() ?>
        </td>
    </tr>
</table>

The idea is that they would like to selectively render specific metadata
from the element or form.

This could be done fairly easily by using overloading. __call() could
intercept methods beginning in 'render', and if the remainder of the
method matches a decorator, would render that decorator.

I've created an issue to track this, and you can view it at:

    http://framework.zend.com/issues/browse/ZF-3217

Please comment, if you are interested in the idea.

--
Matthew Weier O'Phinney
Software Architect       | matthew@zend.com
Zend - The PHP Company   | http://www.zend.com/

Re: Zend_Form rendering enhancement proposal

by davidwinterbottom :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

+1 again here.  My current problem requires radio elements that each have their own "child" elements.  For example:

<div>
<label class="question">Question</label>
<ul class="answers">

<li>
<input type="radio" value="A"> Answer 1
<div class="sub_answers"><label class="sub_question">Select a further option</label>
<select> ... </selection
</div>
</li>

<li>
<input type="radio" value="B"> Answer 2
<div class="sub_answers">
<ol>
<li><label class="sub_question">Add further info </label><select> ... </selection></li>
<li><label class="sub_question">And some more </label><select> ... </selection></li>
</ol?
</div>
</li>
</ul>

I can't work out how to do this one with decorators - more fine-grained control would suit me much better.  Of course, if you can do the above with decorators, please show me how.

On Sun, May 18, 2008 at 4:14 PM, aljames <al.james@...> wrote:


+1 for me. It would make my life alot easier. I actually subclassed
Zend_Form to do something similar, but I would love to remove my custom
code!



Matthew Weier O'Phinney-3 wrote:
>
> A number of users have reported that they'd like syntax like the following
> in Zend_Form:
>
> <table>
>     <tr>
>         <td><?= $this->form->foo->renderLabel() ?></td>
>         <td>
>             <?= $this->form->foo->renderElement() ?>
>             <?= $this->form->foo->renderDescription() ?>
>             <?= $this->form->foo->renderErrors() ?>
>         </td>
>     </tr>
> </table>
>
> The idea is that they would like to selectively render specific metadata
> from the element or form.
>
> This could be done fairly easily by using overloading. __call() could
> intercept methods beginning in 'render', and if the remainder of the
> method matches a decorator, would render that decorator.
>
> I've created an issue to track this, and you can view it at:
>
>     http://framework.zend.com/issues/browse/ZF-3217
>
> Please comment, if you are interested in the idea.
>
> --
> Matthew Weier O'Phinney
> Software Architect       | matthew@...
> Zend - The PHP Company   | http://www.zend.com/
>
>

--
View this message in context: http://www.nabble.com/Zend_Form-rendering-enhancement-proposal-tp17103921p17304033.html
Sent from the Zend MVC mailing list archive at Nabble.com.