View more context

 

null

sorry, I read that as "2 gridfields in 1 tab" 😄

Mo

Anyone ever tried limiting a Member to only one group?

Mo

I am trying to swap the Member.DirectGroups field to s standard DropdownField, but that doesn't seem to do any good

Mo

it is a shame you cant set a limit on ListBoxFIeld

muskie9

what if you sublcass it, found this:

  1. public function getAttributes()
  2. {
  3. return array_merge(
  4. parent::getAttributes(),
  5. 'multiple' => 'true',
  6. 'size' => $this->getSize(),
  7. 'name' => $this->getName() . '[]'
  8. )
  9. );
  10. }

maybe:

  1. public function getAttributes()
  2. {
  3. $attributes = parent::getAttributes();
  4. $attributes['multiple'] = false;
  5. return $attributes;
  6. }
muskie9

not sure if that multiple update would do it, but could be worth a try

muskie9

maybe just hack the class to test first before you get too far into the subclassing

muskie9

if it works, that'd be a nice setter/getter for the class, defaulting to multiple true

Mo

Subclass DropdownField? I was coming to that conclusion as well

Mo

the get attributes approach might be worth trying