Skip to content

Instantly share code, notes, and snippets.

@pborreli
pborreli / Configuration.class.php
Created April 28, 2010 17:01
adding ":" to all labels and "*" to all required fields inside symfony 1.3+ forms
<?php
class privateConfiguration extends sfApplicationConfiguration
{
public function configure()
{
$this->dispatcher->connect('form.post_configure', array($this, 'listenToFormPostConfigure'));
}
/**
<?php
class BaseDoctrineForm extends sfFormDoctrine
{
public function __construct($object = null, $options = array(), $CSRFSecret = null)
{
parent::__construct($object, $options, $CSRFSecret);
// tell the widget schema which fields are required
$this->widgetSchema->addOption('required_fields', $this->getRequiredFields());