hi there,
My users can decide if they want receive money via paypal or banktransfer. There is a dropdownfield where users can choose
between this 2 options. Only if a user choose paypal I want to check if there is a paypal emailadresse and if it's correct (syntax).
And I only want to check if users filled out their bank data if they choosed banktransfer as payment type.
So I subclassed TextField because I need a custom validation. But in my custom validation I also need the value(s) from other form fields, as described above.
In this schema ...
class PaypalEmailField extends TextField {
function validate($validator) {
...
}
}
... I only have access to 1 formfield.
How to make all form fields accessable in the validator function?
To add the validation I use "new RequiredFields" ... but some fields are only required if other fields have special values :-)
anybody dealed with this problematic yet?
thx