Jump to content

Build groups chooser


Heosforo

Recommended Posts

Posted

Hello guys.

I'm trying to add some options to my theme, but I'm lost with how to build the member group selection.

groups_theme.thumb.png.d80c1507375c9fdf2e569e0509435bd4.png

Could someone please help me out? This is very far from my knowledge ?

Big thanks!

 

Posted

Hello,

Use Other/Manual type

and next code

<?php

return new \IPS\Helpers\Form\Select(
	"core_theme_setting_title_{$row['sc_id']}",
	$value === '*' ? '*' : explode(',', $value),
	false,
	array(
		'options' => array_combine(array_keys(\IPS\Member\Group::groups()), array_map(function($_group) { return (string) $_group; }, \IPS\Member\Group::groups())),
		'multiple' => true,
		'parse' => 'normal',
		'unlimited' => '*',
		'unlimitedLang' => 'all'
	),
	null,
	null,
	null,
	'theme_setting_' . $row['sc_key']
);

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...