1. peacetree
  2. Support
  3. Sunday, April 21 2019, 02:43 PM
I have two user groups and I would like to use the username as "display format name" for one group and a text field value (in my case "Business Name" for the other group.

I thought to create a third field (use this for display format name) and autopopulate the date with the field values useranme in case usergroup one and with business name in case of user group b.

thank you
Accepted Answer
admin Accepted Answer
Admin
Hi,
this is possible only by creating template override, for example for a users list you can follow these steps:
- Copy file from /components/com_jsn/views/tmpl/list/default_user.php at /templates/your_template_folder/html/com_jsn/list/default_user.php
- Open the new file and replace code at line 38 with something like this:
if(in_array(8,$this->user->getAuthorisedGroups())) echo $this->user->getField('business_name');
else echo $this->user->getField('formatname');
NOTE: In this example I assume "8" is the ID of usergroups Business

This is an example for the Menu item of type Easy Profile->Users List, you should make modification like this for Users List module, Google Map Module and profile page
  1. more than a month ago
  2. Support
  3. # Permalink


There are no replies made for this post yet.
However, you are not allowed to reply to this post.