2008年12月16日星期二

Re: [fw-mvc] Zend Form: I can't seem to set the name attribute!

I haven't seen anything that would use a form 'name' attribute.  As that makes little sense even when thinking about HTML. 
All scripts normally use form id, and input names; or input ids for direct manipulation without context of a containing form.

Form name should be undefined, properly.  But if you don't want the page to validate, or adhere to any standards it could be added.

I think that one should be able to add this (or any) arbitrary attribute name, but have a warning issues if it's used unless explicitly set a non-conforming state in the library.

Carlos

2008/12/16 maxarbos <maxarbos@yahoo.com>

Is this for real?

There are 1000s of scripts that reference the form name to do javascript
actions and such.

How should something that needs a reference to a form name work then?

Thanks.



Matthew Weier O'Phinney-3 wrote:
>
> -- rollockg <gina-marie.rollock@ntsinteractives.com> wrote
> (on Monday, 01 December 2008, 08:17 AM -0800):
>>
>> I have tried to set the name attribute in Zend Form both by using the
>> setName
>> and the setAttrib methods. All I get is id="name", but no name attribute.
>> I
>> am using 1.7.
>
> The HTML specification does not allow for a "name" attribute for forms.
> setName() on the form will set the id (unless you explicitly set the
> id) -- which is what you are seeing here. setName() exists so that there
> is a consistent API across the Zend_Form classes.
>
> --
> Matthew Weier O'Phinney
> Software Architect       | matthew@zend.com
> Zend Framework           | http://framework.zend.com/
>
>

--
View this message in context: http://www.nabble.com/Zend-Form%3A-I-can%27t-seem-to-set-the-name-attribute%21-tp20774499p21045031.html
Sent from the Zend MVC mailing list archive at Nabble.com.


没有评论: