Hi Xavier,

Please see: http://framework.zend.com/issues/browse/ZF-2115

I'm working on it...

Best,

Andriesss

Xavier Vidal Piera schreef:
Hi

I'd like to know which is the best approach to build complex forms with Zend_Form.

As a example, in a "Register User" form we can find the typical "enter your password" input twice, so when we declare the form in our controller we can do two things:

1. add two "Zend_Form_Element_Password" and add validators to both elements (setrequired, stringlength,...)

or

2. build a new Form_Element called "DoublePassword" where in his "isValid" method we can setup the logic to test if both values are equal with a custom validator (and mantain other possible assigned validators).

At the moment, is there any method or proposal to test values between Form_Elements (like the "equals" between passwords)?.

I've find quite useful to build custom elements to achieve certain functionalities but i don't like to write a lot of them if there is a way to connect elements between them at the validation moment.

--
Xavier Vidal Piera
Enginyer Tècnic Informàtic de Gestió
Tècnic Especialista Informàtic d'equips
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>
http://web.xaviervidal.net
610.68.41.78
------------------------------------------------------------------------

No virus found in this incoming message.
Checked by AVG. Version: 7.5.524 / Virus Database: 269.23.5/1400 - Release Date: 27/04/2008 9:39
Gecontroleerd op virussen door de JOJO Secure Gateway.

Reply via email to