Hi
I have a simple Form for users to register to have access to certain aerea. > Joomla User Group "specialaccess"
The registered users can also become a member of the community.
Then they have to fill out a more complex form.
When i use a new form for this, then i got an error message "this email already exist".
So i want to have the possibility that logged in users can go to a new form with the prepopulated fields from their account "specialaccess".
How can i do this?
Thank you Christoph
Don't save a new user.
You need a save data action, for the table prefix_user_usergroup_map
Data to insert:
user_id:{user:id}
group_id:10 <-- or whatever the id of the group you want to put them in is.
You can use a delete data action to remove them from the old user_usergroup_map if you want.
Hi healyhatman
Thank you very much for helping.
But it's a little bit more complicated than i thought ;-)
I have an extension called easy profiles. This Extension expands the possiblities of ##_users. So i can build some Extrafields.
So when a user register the first time he has to fill out
the joomla minimum (username, name, password, email)
and a few extrafields (Street, Location, Zip-Code) via Easyprofiles.
The two tables are connected via user id.
Now if a registered user is logged in and he wants to become a member, he should come to a new form with some extrafields and prepopulated "Standardfileds" with data from ##_users (joomla standard user table) and ##_jsn_users (Easy Profile Table).
After submit the usergroup should change.
Best regards
Christoph
You only need to populate and use those fields if you want the user to change them.
Either way use read data to get the value of the fields and {var:read_data#.model.field} as the field value
Replace the hash with the right number, look at your read_data action for the name. Black label.
Sorry I just realised you're using the old v5, I thought we were talking about V6. Can't help you with v5 you'll have to look at the instructions.
Ok
Thank you anyway....
Christoph
Hi Christoph,
It looks like {Data_JO.0.name} or {Data_EP.0.strasse}
Bob
Hi
Another Problem. I have a Chronoform5 Form. Getting the User Id and prepopulate fields works fine.
I have a DB save Action in the OnSubmit Aerea. But if a logged in user makes a change in the form, nothing changes.
Thank you
Christoph