i want to change the color of errors that occour when a form is submitted by users, i set
.errorMessage{ color:red }
in main.css, but it dosn't work :(, is there any option for error color in widgets? i google it but i can't find answer, my symfony开发者_StackOverflow社区 version is 1.4.11, and another question is i want to have captcha in my forms, i write this code for that
$this->widgetSchema['captcha'] = new sfWidgetFormReCaptcha(array( 'public_key' => sfConfig::get('app_recaptcha_public_key') ));
$this->validatorSchema['captcha'] = new sfValidatorReCaptcha(array(
'private_key' => sfConfig::get('app_recaptcha_private_key')
));
but when i echo the form this error occour:
Captcha Input error: k: Format of site key was invalid
You need to theme it in template file
<?php foreach($form->getErrorSchema()->getErrors() as $name => $error): ?>
<div class="errorMessage <?php echo $name; ?>"><?php echo $error; ?></div>
<?php endforeach; ?>
You will get something like that:
Captcha Input error: k: Format of site key was invalid
精彩评论