Forums

Fields of a User Group type

BNDragon 19 Nov, 2014
Hi there,

It is possible to show fields depending the user group?

Imagine two users, for example, Employee and Company, some fields like name, address, phone (...) are the same, but for example the date of birth does not make sense for the user Company.

What I want is that some fields only appear depending on the type of user.

Note: You edit the user's profile, and he can not choose his profile again, then I do not want a field to the profile. :/

Thanks in advance,
BN
BNDragon 19 Nov, 2014
Hi calculus00,

Your computerized responses are always pertinent, but that is not what I need, but what leads me to think a call to the DB based solution, but wanted a simple answer if possible.
Max_admin 20 Nov, 2014
1 Likes
Hi BN,

Where/how do you want to show the data ? you can always load the data but don't display it to the user.

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
BNDragon 20 Nov, 2014
Hi Max,

Thanks for your reply,

I was thinking about that, load the user group and then show a div with the fields deppending his group, I was hoping that there was a option on cf that could do it.

BN
GreyHead 20 Nov, 2014
Answer
Hi BN,

There isn't a CF option but it's not hard to do. Use a Custom Code action in the On Load event to get the User's Groups; then use conditional containers to show or hide groups of inputs.

Actually, last time I did this it was easier to set up two different form pages and show one to logged in users and the other to the public.

Bob
BNDragon 20 Nov, 2014
Hi Bob,

Yes, I was thinking on do something like that. I was considering if cf could handle it.

Thanks anyway.

Cya,
BN
BNDragon 20 Nov, 2014
Hi guys,

Just to say (I think that I already had said this somewhere else but) a copy/paste actions would be soooo great my friends. Please, think about it.

thanks,
BN
This topic is locked and no more replies can be posted.