Thanks, this worked like a charm! Chris
Matthew Weier O'Phinney-3 wrote: > > -- Chris Tankersley <[EMAIL PROTECTED]> wrote > (on Wednesday, 30 July 2008, 12:30 PM -0400): >> I have a few form elements where I want a small 'info' button (just an >> image with an onClick trigger) to appear next to the form element >> itself, but I'm not sure how to go about doing this. Should I extend >> Zend_Form_Element_X or is this something a decorator could handle? >> What I am looking for in the final output is something like this: > > In this particular case, I'd use the element's 'description' metadata to > do this: > > $element->setDescription(' /images/info.png '); > > You then need to use this in conjunction with the Description > decorator... and you need to ensure that the Description decorator does > not escape the values: > > $element->setDecorators(array( > 'ViewHelper', > 'Errors', > array('Description', array('escape' => false)), > array('HtmlTag', array('tag' => 'dd'), > array('Label', array('tag' => 'dt'), > )); > >> <dl> >> <dt>LABEL:</dt> >> <dd><input type="text" name="TextBox" id="TextBox"> >> src="/images/info.png" onClick="TextBoxInfo();"></dd> >> </dl> > > -- > Matthew Weier O'Phinney > Software Architect | [EMAIL PROTECTED] > Zend Framework | http://framework.zend.com/ > > -- View this message in context: http://www.nabble.com/Adding-HTML-Elements-to-Zend_Form_Elements-tp18737292p18754100.html Sent from the Zend Framework mailing list archive at Nabble.com.