Sorry for posting this issue here but the GitHub issue tracker for the PUGXMultiUserBundle is throwing a 404 error.
I am having trouble making the profile Edit work.
Mainly one of two issues seems to occur:
- the profile edit of the FOS User bundle says: Method "user" for object "Symfony\Component\Form\FormView" does not exist in FOSUserBundle:Profile:edit.html.twig at line 14
That is what happens if try to access /profile/edit of the FOS User Bundle
- If I have my own Profile controller which I do and try to access my own profile edit method on disctinct controllers based on the discriminator class then the editAction comes up with a blank form.
Here is the code regarding that.... any help would be greatly appreciated.
container->get('pugx_user_discriminator');
$discriminator->setClass('MHO\VmpBundle\Entity\VmpPhysician',$persist = true);
$form = $discriminator->getProfileForm();
$this->container->set('fos_user.profile.form', $form);
```
return $this->container->get('templating')->renderResponse('MHOVmpBundle:Profile:profile_vmp_physician.html.twig', array(
'form' => $form->createView(),
));
}
```
}
and here my form type class:
add("username", "text", array( 'attr' => array(
'readonly' =>'readonly',
'class' => 'form-disabled' )))
->add("email", "email", array( 'attr' => array(
'readonly' =>'readonly',
'class' => 'form-disabled' )))
->add("firstname", "text", array( 'attr' => array(
'readonly' =>'readonly',
'class' => 'form-disabled' )))
->add("lastname", "text", array( 'attr' => array(
'readonly' =>'readonly',
'class' => 'form-disabled' )))
->add("middlename", "text", array(
'attr' => array('readonly' =>'readonly',
'class' => 'form-disabled' )))
->add('suffix', "text", array( 'attr' => array(
'readonly' =>'readonly',
'class' => 'form-disabled' )))
->add('homeAddress1', "text", array(
'label' => 'Address', ))
->add('homeAddress2', "text", array(
'label' => 'Address', 'required' => false, ))
->add('homeCity', "text", array(
'label' => 'City', ))
->add('homeState', "text", array(
'label' => 'State',))
->add('homeZipCode', 'text', array('pattern'=>'[0-9]{5}', 'label' => 'Zipcode', 'attr'=>array( 'maxlength' => '5')))
->add('officePhone', "text", array(
'label' => 'Office phone', ))
->add('fax')
->add('cellPhone', "text", array(
'label' => 'Mobile', ))
->add('npi', 'text', array('pattern'=>'[0-9]{10}', 'attr'=>array( 'maxlength' => '10')))
;
}
public function getName()
{
return 'fos_user_profile_form';
}
protected function buildUserForm(FormBuilderInterface $builder, array $options)
{
parent::buildUserForm($builder, $options);
}
```
}
Any ideas on what I could to get this to work?