Hi,
I have a feature request, which I think is truly appropriate to make this nice module great. Please consider this request. I have a requirement where I want account and profile edit forms on a single page. I have different profile categories which link to different roles so let say there is a role of student, which has a profile category Student and there is another role teacher having profile category Teacher. Now I want a single edit page where they have typical account edit form and after this form another form which obviously Profile form according to the selected category of respective user. so for Student account edit page has Account edit form and after this form profile edit form for category Student. If we have more than one category associated with this user role It can be shown weight wise. Hope I am able to clarify what I am talking about. I am also attaching a jpg to further illustrate. Hope to hear from you soon. Thoughts please.
Regards,
Adnan Haider
| Comment | File | Size | Author |
|---|---|---|---|
| single page account and profile edit demo.jpg | 38.77 KB | adnanhader |
Comments
Comment #1
fagoI'd like to avoid featurities in profile2, so features like that should be implemented in external extension modules.
Comment #2
devtherock commentedHi, I was looking for the same, searched for module which can create a single user edit form, but didn't find. So in hook_form_alter I have added
and it displayed a complete form.
Thanks.
Comment #3
adnanhader commentedthanks... good code snippet
Comment #4
kardave commentedThanks!
If it's that simple, I'd vote for patch :)
Comment #5
shadowdknight commenteddevtherock,
can you provide a patch ?
Thanks
Comment #6
ram4nd commentedImproved #2. If the profile wasn't created, the user is made by facebook module for an example, the form wasn't displayed.
Comment #7
sliiiiiide commentedWhen I tried any of the above code snippets, the profile2 form fields appeared on the acount edit page but values were not saved on submission. Debugging indicated that the $form_state['profiles'] were not being passed on to profile2_form_submit_handler function in profile2.module. As a quick fix I added a custom submit handler that seems to do the job for me and may help someone else.
Comment #8
stevenx commented#7 helped me. thanks for sharing your code
Comment #9
ktrev commentedthe code in #7 helped me to have all the fields in the edit page.But the tabs are still showing.
Comment #10
dellad commented#7 worked for me too. Lifesaver. Thanks so much!!!!
Comment #11
rakesh.gectcr#7 worked for me . Is there any way to reorder the form ?
Comment #12
Romain Trenet commented#7 worked for me too. Thanks ! I'm now searching how to reorder the form and hide the tabs.
Comment #13
oksana-c commentedanyone came up with a solution on reordering the form and hiding tabs?figured it out.
Hide tabs 1) tab tamer module. or 2) place following code in your own module:
Reorder profile field groups -> Each profile type has two weight values, which can be set on "admin/structure/profiles/manage/your_profile" page.
Comment #14
Bill Choy commentedExcellent solution.
Getting the fields ordered properly was a pain, because the Managed Fields UI would reset the weight. Had put things into DIV/Fieldsets to hardcode weights, in the hook_form_alter.
Comment #15
ownage commented#7 did the trick, but now my Profile2 Date field isn't working:
Does anyone know why this might be happening or have any tips I could try out?
Comment #16
ownage commentedIs anyone still using this snippet to combine the elements into a single Edit page? This is a widely requested Profile2 feature and I am not sure if this is the best solution out there anymore so wanted to ask.
I removed the Date field from my custom profile, but one warning & notice remains on the Edit screen:
Notice: Undefined index: profiles in profile2_form_validate_handler() (line 428 of /sites/all/modules/profile2/profile2.module).
Warning: Invalid argument supplied for foreach() in profile2_form_validate_handler() (line 428 of /sites/all/modules/profile2/profile2.module).
Line 428 is in the foreach below:
I really wish I knew more to fix this. If anyone has anything they can offer, please do!
Thank you for your time!
Comment #17
ashish.verma85 commentedhi, that can solve this issue,
https://www.drupal.org/project/account_profile
Thanks