Excellent,
Thanks much for your help Matthew. Your comments helped me understand and
figure out most of what I was shooting for. I'm still hitting one problem.
I can't seem to figure out how to just add a simple (X)HTML element with
it's own text. Meaning, I want to add a element with dynamic content to
some part of the Zend_Form.
The current XHTML is this (some attributes removed for brevity)...
- - - - - - - - - - - - - - - - - - - - - - - - -
<form>
<fieldset>
<legend>My Legend</legend>
<dl>
<dt><label>Title*:</label></dt>
<dd><input type="text" /></dd>
<dt><label>Requestor*:</label></dt>
<dd><input type="text" /></dd>
<dt><label>Sponsors:</label></dt>
<dd><input type="text" /></dd>
</dl>
</fieldset>
<input type="hidden" value="Hidden Value" />
<input type="submit" value="Save" />
</form>
- - - - - - - - - - - - - - - - - - - - - - - - -
My simple need now is to just simply add "<span>*
Required</span>" into this XHTML code between the closing "</dl>" and
the closing "</fieldset>" like this...
- - - - - - - - - - - - - - - - - - - - - - - - -
</dl>
<span>* Required</span>
</fieldset>
- - - - - - - - - - - - - - - - - - - - - - - - -
The "span" could be a "div" too, it doesn't really matter what HTML element
it is. Likewise, "* Required" text could be changed at any time,
dynamically.
I can figure out how to slap the "<span></span>" tag in there
using Decorators, but I can't seem to figure out how to put my own
personnalized content between the "span" tag.
I tried a "Label" decorator on the "Display Group" element but Label's are
not implemented for that element. Does that mean I'll have to create my own
Display Group class to extend this functionality? Or is there an easier way
to just put my own HTML elements with my own message into a form?
Cheers!
Fozzy
ps. Sorry, "span" tags where being filtered out and not HTML converted
before. So, I had to change the code to & lt; and & gt;
--
View this message in context:
http://www.nabble.com/Zend_Form---SubForm-and-decorators-tp19393526p19402394.html
Sent from the Zend Framework mailing list archive at Nabble.com.