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!