0

I am working with Sonata Admin Bundle, and have a question about constraining a pull down selector when Creating a new entry (Entity) via the admin.

The form has a selector for publisher_id and for publisher_subaccount_id.

Currently the pull down selection for publisher_subaccount_id shows all values for publisher_subaccount_id - I'm trying to constrain it to just the values of publisher_subaccount_id that are from the publisher_id already selected. Here is what the configure form fields looks like:

protected function configureFormFields(FormMapper $formMapper)
{
    $formMapper
        ->add('publisher_id', 'entity', array('class' => 'AppBundle\Entity\Publisher','property' => 'id'))
        ->add('publisher_subaccount_id', 'entity', array('class' => 'AppBundle\Entity\PublisherSubaccount','property' => 'id'))
}

Thanks in advance for any help or point in the right direction.

Kirk B
  • 551
  • 6
  • 23

0 Answers0