1 Oct 10:48
Re: CForms: on-action handling
Sylvain Wallez <sylvain <at> apache.org>
2006-10-01 08:48:42 GMT
2006-10-01 08:48:42 GMT
Simone Gianni wrote: > Hi Vadim, > I can't remember, but without validating before executing it's > possible to make buttons like "Fill with default values" or "Use the > same address for delivery" which could not be possible if the form > gets validated before performing the action. Wasn't there a > validate="true|false" attribute on actions? Yup, you're right. Actions can change the contents of the form, and thus validation occurs after actions are run. As for the validate="true|false", it is meant to allow actions that should exit form.show() without even trying to validate. This for actions such as "cancel". > Vadim Gritsenko wrote: >> Hi All, >> >> Just recently noticed that on-action events are fired before form is >> validated :) >> >> Can anybody recall the reason why this was done? Any reason why not >> do it after validation? Since most of the time actions will >> manipulate forms content, it makes sense to validate complete form >> first, or so it seems. WDYT? -- -- Sylvain Wallez - http://bluxte.net(Continue reading)
At least that's how it should be. Since it's too slow, I'm now resolved to doing
it once a week :-P
Vadim
RSS Feed