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]
[EMAIL PROTECTED]
http://web.xaviervidal.net
610.68.41.78

Reply via email to