Add the following field to modules/mod_login/mod_login.xml
:
<field name="test" type="usergroup" multiple="true" label="Usergroup" />
Ability to select multiple usergroups which then become appended to the input (similar to selecting tags for an article)
Warning: htmlspecialchars() expects parameter 1 to be string, array given in C:\dev\joomla4\layouts\joomla\form\field\text.php on line 96
I assume it's most likely calling the wrong layout
Labels |
Added:
?
|
BTW, such a field exists for debug
<field
name="filter_groups"
type="usergrouplist"
label="PLG_DEBUG_FIELD_ALLOWED_GROUPS_LABEL"
multiple="true"
filter="int_array"
size="10"
/>
and it works there for what it does.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-01-15 10:46:14 |
Closed_By | ⇒ | C-Lodder |
@infograf768 Adding it to the Login module was purely an example. I'm trying to use it in my own extension.
usergrouplist
seems to work...thanks.
That said, if usergroup
is deprecated and is planned to be removed in J4, I still shouldn't be geetting an error, seeing
The logic would be that for "usergroups" as for "tag" we get a new field type similar to CategoryeditField.php or ModulesPositioneditField.php using choice.js.
No idea if anyone working on that
Can you explain what you are trying to do with such a field in the login module?
Limiting login to specific groups?
BTW: Unhappily, selecting a tag or multiple tags is badly broken in 4.0