Pages

Wednesday, April 13, 2011

Required Error does not appears next to field in symfony Doctrine formWidgets

If you are using form widgets and drawn the fields in the template using reder() function you might get this kind of error.ie required errors will not display.

If a form is submitted it will be validated but will not display error/required information in production and shows errors in debug toolbar in dev version then this would the solution use renderError to show the errors as this
<?php echo $form['name']->renderError(); ?>
<?php echo $form['name']->renderLabel(); ?>
<?php echo $form['name']->render(); ?>

Hope this helps someone.........

No comments:

Post a Comment