Propel generators are very useful tool, they automate creating of most common CRUD modules. However default theme have serial issues. Mostly, html forms are based on tables and list is not a sfPropelPager. But there is an easy way to make your own theme based on symfony default. You can find it into sf_pear_dir/data/generator/sfPropelModule/default and… Read more »
symfony
[Symfony] Getting array of errors from sfForm
That was tricky. I hope it will help somebody. <?php class SomeForm extends sfForm { //.. /** * Return array of current errors * * @return array */ public function getErrorsArray() { $errors = $embedded_forms_name = array(); foreach($this->getEmbeddedForms() as $embedded_form){ $embedded_forms_name[] = $embedded_form->getName(); } foreach($this as $field){ if($field->hasError()) { if(in_array($field->getName(), $embedded_forms_name)){ foreach($field as $field_embedded){… Read more »