Skip to content

Instantly share code, notes, and snippets.

@adrexia
Last active March 5, 2020 03:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save adrexia/8d6d598cb67f245002fd to your computer and use it in GitHub Desktop.
Save adrexia/8d6d598cb67f245002fd to your computer and use it in GitHub Desktop.
Member listbox
$memberMap = Member::get()->map("ID", "FirstName")->toArray();
asort($memberMap);
$memberMap = ListboxField::create('Collaborators', singleton('Member')->i18n_plural_name())
->setMultiple(true)
->setSource($memberMap)
->setAttribute(
'data-placeholder',
'Collaborators'
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment