getFormFieldSchema() as $fieldname => $field) { $widgetSchema = $form->getWidgetSchema(); if((($widgetSchema[$fieldname] instanceof sfWidgetFormInput) || ($widgetSchema[$fieldname] instanceof sfWidgetFormInputPassword)) && !($widgetSchema[$fieldname] instanceof sfWidgetFormInputHidden) && !($widgetSchema[$fieldname] instanceof sfWidgetFormInputFile) && !($widgetSchema[$fieldname] instanceof sfWidgetFormInputCheckbox) ) { $widgetSchema[$fieldname]->setAttribute('class', $widgetSchema[$fieldname]->getAttribute('class').' textInput'); } $validatorSchema = $form->getValidatorSchema(); if(isset($validatorSchema[$fieldname]) && $validatorSchema[$fieldname]->getOption('required')) { $widgetSchema[$fieldname]->setAttribute('class', $widgetSchema[$fieldname]->getAttribute('class').' required'); $widgetSchema[$fieldname]->setLabel($widgetSchema[$fieldname]->getLabel().' *'); } } } public static function setJqUiFormater(sfForm $form) { $widgetSchema = $form->getWidgetSchema(); $widgetSchema->addFormFormatter('jqUi', new jqUiFormSchemaFormaterTable($widgetSchema)); $widgetSchema->setFormFormatterName('jqUi'); } public static function setJqUiAdvanceFormater(sfForm $form) { $widgetSchema = $form->getWidgetSchema(); $widgetSchema->addFormFormatter('jqUiAdvance', new jqUiAdvanceFormSchemaFormaterTable($widgetSchema)); $widgetSchema->setFormFormatterName('jqUiAdvance'); } } class jqUiFormSchemaFormaterTable extends sfWidgetFormSchemaFormatterTable { protected $helpFormat = '%help%'; protected $errorListFormatInARow = "