Hi all,
Because the new form system is new, I'm going to paste my whole form,
partly for example..
class LoginForm extends sfForm
{
public function configure()
{
$schema = new sfWidgetFormSchema(array(
'login_username' => new sfWidgetFormInput(),
'login_password' => new sfWidgetFormInputPassword(),
));
$schema->setLabel('login_username', 'Username');
$schema->setLabel('login_password', 'Password');
$this->setWidgetSchema($schema);
$this->setValidatorSchema(
new sfValidatorSchema(array(
'login_username' => new sfValidatorString(),
'login_password' => new sfValidatorString(),
)));
}
public function bind($vars)
{
$request = sfContext::getInstance()->getRequest();
if ($request->hasParameter(self::$CSRFFieldName))
{
$vars[self::$CSRFFieldName] =
$request->getParameter(self::$CSRFFieldName);
}
parent::bind($vars);
}
}
Here you can see i'm creating a simple form, 2 fields, both with defined
labels.
However, the labels for these forms aren't printed though the __()
function for i18n to take place.
Not sure if this is a bug, a feature I'm missing, or somethign the form
widgets just simply shouldn't be doing.
--
Ian P. Christian ~ http://pookey.co.uk
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en
-~----------~----~----~----~------~----~------~--~---