symfony2admingenerator / AvocodeFormExtensionsBundle

(old-legacy) Symfony2 form extensions for Admingenerator project (also working standalone!)
Other
48 stars 31 forks source link

select2 cant generate route #94

Closed thechoiceone closed 10 years ago

thechoiceone commented 10 years ago

Hi, im following this https://github.com/avocode/FormExtensions/issues/22 to get select2 field in my form but im getting this error:

Notice: Undefined property: Acme\DemoBundle\Form\Type\Demanda\NewType::$router in C:\xampp\htdocs\gestion\src\Acme\DemoBundle\Form\Type\Demanda\NewType.php on line 29

Fatal error: Call to a member function generate() on a non-object in C:\xampp\htdocs\gestion\src\Acme\DemoBundle\Form\Type\Demanda\NewType.php on line 29

im using newType instead of editType but im getting the same if i puth the code in edit, here is my NewType.php

<?php //src/Acme/DemoBundle/Form/Type/Demanda/Newtype.php namespace Acme\DemoBundle\Form\Type\Demanda;

use Admingenerated\AcmeDemoBundle\Form\BaseDemandaType\NewType as BaseNewType; use Symfony\Component\Routing\Matcher\UrlMatcher; use Symfony\Component\Routing\RequestContext; use Symfony\Component\Routing\RouteCollection; use Symfony\Component\Routing\Route; use Symfony\Component\HttpFoundation\Request; use Symfony\Component\DependencyInjection\Container;

/**

my field in generator.yml cliente: label: Cliente getter: cliente.nombre filterOn: cliente formType: afe_select2_entity

im stuck with this becouse my json response is workin good in i dont have how to try,

im also have replaced the $this->router->generate('queryClientes') whit the route and this show almost all the form, but not show the select2 field.

ty for your time guys and good luck

thechoiceone commented 10 years ago

i close this isue becouse im using anoter bundle for ajax select ty any way