Skip to content

voryx_entity form type don't work #40

Description

@amsolucionesweb

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions