It's possible, when validating a form, to check if a field is correct dependently of an other field's value. First, in your configure method, after the declaration of your validators, add : $this->validatorSchema->setPostValidator( new sfValidatorCallback( array('callback' => array($this, […]
Mot-clé - form
[Symfony] Overwrite a value in a form
It happen sometimes that you have to set/override a value within a form but without using a hidden field (that can be overridden) Here is a short solution to set the user id in the object we are going to save. Let's say that we have an object PersonnalData linked to the sfGuardUserProfile In your […]