cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <>
Subject Re: Bug in forms-lib.js when adding @id to submit buttons?
Date Wed, 03 Nov 2004 11:53:55 GMT
On 03.11.2004 11:56, Sylvain Wallez wrote:

> The problem is not in CForms, but in HTML: each form element (input, 
> button, etc) is added as a property of the form it belongs to. Problem 
> is that these new properties hide those that may already exist with the 
> same name on the form.
> And a form already has a "submit" property which is a function, which 
> means that if you have an <input name="submit">, we can no more 
> programmatically submit the form using "form.submit()"...

Indeed a nice one ...

> So the solution is to avoid naming CForms widget "submit"... Maybe we 
> could enforce this at the form definition parsing level?

Hmm, I would not do it. On the one hand you can not check the code added 
in the templates as Bart did it. On the other hand form has more 
properties though submit is probably the most used one. What about a 
property 'action'? It would also break the form. It's a problem of HTML, 
so we should not fix it in CForms IMO. Otherwise it will be a never 
ending story. It's a 'feature' that should made it into the FAQ.


View raw message