It works for me with this:
schema
--------------
Profile:
columns:
first_name: string(255)
last_name: string(255)
email_address: string(255)
sf_guard_user_id: integer(4)
relations:
User:
class: sfGuardUser
type: one
foreignType: one
user form
--------------
class sfGuardUserForm extends PluginsfGuardUserForm
{
public function configure()
{
unset($this['is_active'], $this['is_super_admin'], $this['created_at'],
$this['updated_at'], $this['last_login'], $this['algorithm'], $this['salt'],
$this['groups_list'], $this['permissions_list']);
$profile = new ProfileForm();
unset($profile['sf_guard_user_id']);
$this->embedForm('Profile', $profile);
}
}
actions
----------
class testActions extends sfActions
{
/**
* Executes index action
*
* @param sfRequest $request A request object
*/
public function executeIndex($request)
{
$this->form = new sfGuardUserForm();
if ($request->getMethod() == sfRequest::POST)
{
$this->form->bindAndSave($request->getParameter('sf_guard_user'));
$this->redirect('test/index');
}
}
}
template
-----------
<form action="<?php echo url_for('test/index'); ?>" method="POST">
<table>
<?php echo $form; ?>
</table>
<input type="submit" name="save" value="save" />
</form>
On Thu, Oct 30, 2008 at 9:49 AM, kayoone <[EMAIL PROTECTED]> wrote:
>
> complete and updated code:
> http://nopaste.php-q.net/66370
> >
>
--
Jonathan H. Wage
Open Source Software Developer & Evangelist
http://www.jwage.com
http://www.doctrine-project.org
http://www.symfony-project.org
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---