OKe. I tried to allow users choose between 10 custom user groups. Any JS will not help in this case, I assume....
- First step, I created seblod checkbox field with 10 options=names of groups and values=ID's of those groups.
- Next step, I created 10 seblod text fields (without storage) and set conditions (if group is checked=>a fiedl get value ID of group).
- Final step, I created SD concat field to concatenate values of those text fields like "1,2,3,4" etc.
I've found out that J3! creates one row in table
#__user_usergroup_map per each group,...like
666 / 1
666 / 2
where 666 is ID of user and 1,2...user group(s).
Therefore, it's not possible to write the retreived data from SD concat in the DB table.
Any ideas how to setup fields??? maybe there is a solution how to customize standard
user_groups field and allow users multi-select only custom group ID's (at the moment user may choose Administrator!! group)