ZF-3518: CLONE -Adding brute text - the old one was resolved

Issue Type: Improvement Created: 2008-06-26T07:56:30.000+0000 Last Updated: 2012-04-26T12:13:20.000+0000 Status: Closed Fix version(s): Reporter: Tomáš Fejfar ( Assignee: Frank Brückner (frosch) Tags: - Zend_Form

Related issues: - ZF-10205



We should be able to add a gross text and use it like label. Exemple for checkbox I accept this condition


Posted by Tomáš Fejfar ( on 2008-06-26T07:56:41.000+0000

API could be something like

<pre class="highlight">
$select = new Zend_Form_Select() //create some element
$plain = new Zend_Form_Element_PlainText('myPlainText'); //plain text node element

This item needs further explanation, which can be found <a>here</a>

'); //set text for the node


<pre class="highlight">


This item needs further explanation, which can be found <a>here</a>

Posted by Tomáš Fejfar ( on 2008-06-26T07:58:14.000+0000

Sorry if cloning was not needed, but the old issue was closed with result, so it seems no one won't check for new comments there anymore.

Posted by Ryan Mauger (bittarman) on 2009-09-22T03:00:42.000+0000

I'm not sure that this is needed. the usecase described is easily resolved by simply using setDescription on the element you want to add some text for. If you then wish to alter how the description is displayed, you can simply change the properties / order of the decorators on the element.

Is there any other usecase than adding some meta to an existing element in a form, or to the form itself?

Posted by Tomáš Fejfar ( on 2009-09-22T05:29:57.000+0000

Yes, in some cases. Let's think of elements like "blocks" that build the form. Description is "more information about element". When you need, let's say, add description to the checkbox "Without agreement you can't place the order". And than you need to "echo" the license agreement. You can'T set two different descriptions, can you? Imagine client of my eshop wants sometimes the LA above and sometimes below the checkbox. To change this i have to juggle the element's decorators (for example when using table form) to have the LA in single row. And no the same row as element. Whereas with new "form element" it would be only as easy as changing element positions. Or other - let's have this form structure:

How would I set the "long_text"? Plaintext element would offer painless solution for all the problems. I should have "ignore" always to "true" and "require" to "false" and would be compatible with current form implementation. In addition it would benefit from the abbility to be decorated using decorators.

Posted by Tomáš Fejfar ( on 2009-09-22T05:33:43.000+0000

Not mentioning that the copied issue has the same resolution: "Create your own element." @see…

Have you found an issue?

See the Overview section for more details.


© 2006-2018 by Zend, a Rogue Wave Company. Made with by awesome contributors.

This website is built using zend-expressive and it runs on PHP 7.