2008年8月8日星期五

Re: [fw-mvc] Spurious
at start of form

-- Gordon Ross <gr306@ucs.cam.ac.uk> wrote
(on Friday, 08 August 2008, 11:58 AM +0100):
> In the source HTML of my form I'm getting an unwanted </br> tag as the very
> first thing output.
>
> The start of my form __construct method is:
>
> class ExtensioneditForm extends Zend_Form
> {
> public function __construct($options = null)
> { parent::__construct($options);
> $this->setName('extensionedit');
> $this->setDecorators(array('FormElements', array('HtmlTag', array('tag'
> => 'table')),'Form'));
> ...
>
> Where is this suprious </br> coming from ? (and how do I get rid of it ?)

It's unlikely that it's being generated from Zend_Form. Of all the form
classes, only the Radio and MultiCheckbox form elements utilize a <br/>
tag -- as a separator between the various radio/checkboxes they
generate.

You indicate that the </br> occurs _before_ the opening <form> tag (or
that's what I infer from your language)... I'd check your view and
layout scripts.

--
Matthew Weier O'Phinney
Software Architect | matthew@zend.com
Zend Framework | http://framework.zend.com/

没有评论: