I checked out the current PR3 Branch from symfony-sandbox and tried to
build a Form with it (since it didnt work for me with PR2).
My controller contains a register action:
public function registerAction()
{
$user = new User();
$form = new Form('user', $user, $this->container-
>getValidatorService());
$form->add(new TextField('name'));
$form->add(new Textfield('password'));
return $this->render('MapEditorBundle:User:register',
array('form' => $form));
}
The view itself is just like in the tutorial:
<?php $view->extend('MapEditorBundle::layout') ?>
<?php echo $form->renderFormTag('#') ?>
<?php echo $form->renderErrors() ?>
<?php echo $form->render() ?>
<input type="submit" value="Send!" />
</form>
I get some output, however, the html is escaped, this is an example of
the html source:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
<title>Elenears Erben - Map Editor</title>
</head>
<body>
<h1>Hello Application</h1>
<form action="#" method="post">
<table>
<tr>
<td><label for="user_name">Name</
label></td>
<td>
<input id="user_name" name="user[name]"
value="" type="text" />
</td></tr>
<tr>
<td><label for="user_password">Password</
label></td>
<td>
<input id="user_password" name="user[password]"
value="" type="text" />
</td></tr>
</table>
<input type="submit" value="Send!" />
</form>
<!-- START of Symfony 2 Web Debug Toolbar --
Is this a current issue with the PR3 branch or is there something
wrong with my code?
--
If you want to report a vulnerability issue on symfony, please send it to
security at symfony-project.com
You received this message because you are subscribed to the Google
Groups "symfony users" 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-users?hl=en