Grouping user attributes on register/edit pages
Permalink 1 user found helpful
I'm wondering if there is a relatively easy way to group user attributes in the register and edit profile forms, kind of like fieldsets. A current project will have *lots* of user attributes, and being able to organize them visually would be a big help.
I know they can be reordered (which is a huge help!) but I'm hoping to also be able to insert subheadings or another visual break in what would otherwise be just a long list of fields.
Any ideas?
Or is hand-coding that on the register and profile single pages the only way to go? (please, please, no)
I know they can be reordered (which is a huge help!) but I'm hoping to also be able to insert subheadings or another visual break in what would otherwise be just a long list of fields.
Any ideas?
Or is hand-coding that on the register and profile single pages the only way to go? (please, please, no)
Unfortunately right now you'd have to hand code it, like we do on concrete5.org. In our next version we should be rolling out attribute sets to everywhere and that would group attributes by field set, but that isn't ready yet.
Got it. Thanks for your response!
I'm imagining I can set up the user attributes and then call them by their id when coding the registration / profile forms. Will have to dig around to see how to do that.
It will be awesome to have them groupable in the core. If that extends to Page Attributes I'm going to be SUPER psyched!
I'm imagining I can set up the user attributes and then call them by their id when coding the registration / profile forms. Will have to dig around to see how to do that.
It will be awesome to have them groupable in the core. If that extends to Page Attributes I'm going to be SUPER psyched!
Kirk,
I just did this for a client, and working on something similar for another client. It is a pain to hand-code, but once you get the hang of it, it goes pretty smoothly.
You probably don't need it, but here's my code for a profile page (in a table for easy display control):
I just did this for a client, and working on something similar for another client. It is a pain to hand-code, but once you get the hang of it, it goes pretty smoothly.
You probably don't need it, but here's my code for a profile page (in a table for easy display control):
<div class="ccm-profile-body-item"> <h1><?php echo $profile->getAttribute('bureau_name', 'displaySanitized', 'display'); ?></h1> <table id="userProfile"> <tr> <td class="profileLabel">Director</td> <td><?php echo $profile->getAttribute('director_name', 'displaySanitized', 'display');?></td> </tr> <tr> <td class="profileLabel">Address</td> <td> <?php echo $profile->getAttribute('address_1', 'display');?><br/> <?php echo $profile->getAttribute('city', 'display') .', '. $profile->getAttribute('state', 'display') . ' ' . $profile->getAttribute('zip', 'display');?> </td> </tr> <tr>
Viewing 15 lines of 36 lines. View entire code block.
Wow, thanks for posting that!
Did your customization extend to the registration form and profile edit form? Those are the ones I'm dreading putting together. Although, as you say, it's probably not too bad once you get in the swing. If you have that code to post I'm sure many could benefit from it.
Thanks again!
Did your customization extend to the registration form and profile edit form? Those are the ones I'm dreading putting together. Although, as you say, it's probably not too bad once you get in the swing. If you have that code to post I'm sure many could benefit from it.
Thanks again!
Haven't built the registration form yet, but plan to. This client doesn't really allow the members of this group to edit their own information, so there's no profile edit form.
Good thread, hopefully someone still monitors it!
I used a fairly cumbersome approach to get my profile page displaying nicely by calling each user attribute individualy within php blocks.
However I can't get past the problem you are alluding to with the "profile/edit" page. I made a custom edit page which diplays the user attribute's individually in the form, but I've had no success in getting the data to post and save. I think its becasue the controller.php file is expecting an array as with the normal profile/edit page.
Might have to resign to having one long page of editable fields for the edit page. If anyone has sucessfully done this then please share with me and my fellow php hacks!
I was hoping to be able to link each section of my profile page to its own edit page: eg "profile/basic_info" "profile/resume" "profile/avatar".
I used a fairly cumbersome approach to get my profile page displaying nicely by calling each user attribute individualy within php blocks.
However I can't get past the problem you are alluding to with the "profile/edit" page. I made a custom edit page which diplays the user attribute's individually in the form, but I've had no success in getting the data to post and save. I think its becasue the controller.php file is expecting an array as with the normal profile/edit page.
Might have to resign to having one long page of editable fields for the edit page. If anyone has sucessfully done this then please share with me and my fellow php hacks!
I was hoping to be able to link each section of my profile page to its own edit page: eg "profile/basic_info" "profile/resume" "profile/avatar".
Wow. Hard to believe it's been two years since I posted this.
Honestly, I haven't touched Concrete5 in almost a year, since the famed 5.5 update. Because of speed issues/page load times, etc., and having to implement 3rd party solutions to get my sites to load in a reasonable amount of time, I've migrated my existing sites and new client sites to another CMS. And all those problems disappeared from my life.
I wish I could help more. Sorry!
Honestly, I haven't touched Concrete5 in almost a year, since the famed 5.5 update. Because of speed issues/page load times, etc., and having to implement 3rd party solutions to get my sites to load in a reasonable amount of time, I've migrated my existing sites and new client sites to another CMS. And all those problems disappeared from my life.
I wish I could help more. Sorry!