1. blocdaddy
  2. Support
  3. Thursday, January 23 2020, 06:21 AM
Currently, when a user registers, the name of the member on the profile page and modules("jsn-p-title" container in profile page, "jsn-l-title" container in modules) is mapped from the user’s first, middle, and last names entered during registration. However, I now have both businesses and individual users registering on my site and need to register some users under their business name rather than their individual name. For example, instead of “John Smith,” I’d like the name title to show “ABC Corporation” in some situations even though it’s John Smith who’s registering on behalf of the corporation.

The methods I’ve used to try and accomplish this have been cumbersome and haven’t worked so far. For example, I created a custom registration field entitled “business name,” then changed the options in the main Easy Profile settings to show a custom user name as {firstname} {lastname} {businessname}, then used conditions to hide the firstname and lastname fields when someone filled out the business name field in certain situations and vice-versa. Although the business name would then show up as the name title and the individual’s name would be hidden, it would also hide the individual name on the backend so when someone tried to update the profile it wouldn’t allow anything to save because there were no required name fields (which Joomla apparently considers empty although they were only hidden).

So...is there a way to show only the business name in some instances and only the individual name in some instances and still be able to edit everything in the backend? If it makes any difference, the businesses are already assigned to a different Joomla user group than the individuals when they register.

Additionally, is there any way to have a second avatar option which would appear in the avatar container on both the profile page and modules if it's a business registering vs. an individual registering? I’ve modified the code in default.php to show/hide different badges based on different Joomla registration groups, but am not clear on how to specifically modify the avatar field/container to accomplish something similar.

Thanks for your help!
Accepted Answer
admin Accepted Answer
Admin
Hi,
for the displayed name you can follow an example at https://www.easy-profile.com/support/pass-value-from-one-input-to-another.html

Instead to use more than one avatar is a bit complex because require PHP knowledges, basically you can create a second avatar field (image field type) and for each view (profile, users lists and users module) you need to create a template override and customize it to show the specific avatar.
  1. more than a month ago
  2. Support
  3. # Permalink
blocdaddy Accepted Answer
Works great! Thanks for the always quick and great help!
  1. more than a month ago
  2. Support
  3. # 1
  • Page :
  • 1


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