How To Create Multi Select Box Recursive

Hi , I have a Problem , I want to create a multi select box .

$this->add(new Select('controller[]', array('1','2','3','4','5'), array( 'useEmpty' => false, 'multiple' => true )));

Result code

  • ---1
  • ---2
  • ---3
  • ---4
  • ---5

But I want to show like this .

  • --- Menu
  • ----- 1
  • ----- 2
  • ----- 3
  • ----- 4
  • --- Funny
  • ----- 1
  • ----- 2
  • ----- 3
  • ----- 4
  • --- Parent
  • ----- 1
  • ----- 2
  • ----- 3
  • ----- 4

And go on . Menu,Funny is a empty Options , how to do this ?

I don't think that the boilerplate Select method supports this at the moment. I was looking into this a little while back.

You can however create your own helper functions. Go Here for more info on that.