Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

voryx_entity form type don't work #40

Open
amsolucionesweb opened this issue Jul 20, 2016 · 0 comments
Open

voryx_entity form type don't work #40

amsolucionesweb opened this issue Jul 20, 2016 · 0 comments

Comments

@amsolucionesweb
Copy link

I post this json with angularjs

{
"name":"mason inc"
"status": {
        "id": 1
        "name": "Enable"
    }
}

My form is:

$builder
            ->add('name')
            ->add('status', 'voryx_entity', array(
                    'class' => 'AppBundle\Entity\Status',
                )
            )
;

And Response is:

{
   "errors":{
      "form":{
         "children":{
            "name":{

            },
            "status":{
               "errors":[
                  "The selected entity does not exist"
               ]
            }
         }
      },
      "errors":[

      ]
   }
}

What is the error ?, because DataTransformer provide in line 55

 if (is_array($data) && isset($data['id'])) {
            return $data['id'];
        }

Symfony version: 2.8.6 and de entity 1 exists in the data base.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant