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

Not working in form collections #28

Open
carlescliment opened this issue Nov 9, 2012 · 0 comments
Open

Not working in form collections #28

carlescliment opened this issue Nov 9, 2012 · 0 comments

Comments

@carlescliment
Copy link

My app has a form type (StockType) with an autocomplete field that works fine.

class StockType extends AbstractType {

    public function buildForm(FormBuilder $builder, array $options) {
        $builder
            ->add('product', 'shtumi_ajax_autocomplete', array(
              'required' => true,
              'entity_alias' => 'products',
              'label' => 'Producto: ',
        ))
        ->add('amount', null);
    }

// ...
}

Then I added a form collection named StockCollectionType:

class StockCollectionType extends AbstractType {

    function buildForm(FormBuilder $builder, array $options) {
        $builder
            ->add('items', 'collection', array(
                'type' => 'stock_type',
                'allow_add' => true,
                'allow_delete' => true,
                'by_reference' => false,
                'options' => array('required' => true)
        ));
    }

// ...
}

for some reason it seems not to be working.

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