Hi, Not tested:
public function configure() { ... # add * to required fields' labels: foreach ($this->widgetSchema as $name => $widget) { if (isset($this->validatorSchema[$name]) && $this->validatorSchema[$name]->hasOption('required') && $this->validatorSchema[$name]->getOption('required') == true) { $label = ($widget->getLabel() != null) ? $widget->getLabel() : $name; $widget->setLabel($label.' *'); } } } Le jeudi 15 janvier 2009 à 22:58 -0800, CiPheR a écrit : > Does anyone know how to automatically add an indicator (like "*" or > "required") to the labels of propel generated forms? Considering that > the form validator already knows which fields are required, it would > be nice if we can show the user which fields are required right away > rather than have them submit and the come back with "required" > validation messages. > > > > -- Thomas Dedericks tho...@tequila-studio.com GSM: +32 (0) 499 23 60 22 http://tequila-studio.com --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "symfony users" group. To post to this group, send email to symfony-users@googlegroups.com To unsubscribe from this group, send email to symfony-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en -~----------~----~----~----~------~----~------~--~---