Show User Attribute Sets on Registration Forms


I have a lengthy registration form that needs to be grouped via their User Attribute Sets, is there a way to do this via the register.php file?

I have been doing a little research on php as its a language I am now having to understand a little; as I'm predominantly a front-end developer and notice that I could find the $variable and possibly "print" it? but i've tried to include it into the register.php existing code and it breaks.

could anyone suggest a way of doing this?

thanks in advance.

Best wishes,


View Replies:
tallacman replied on at Permalink Reply
Im pretty sure Pro Forms does this. Its very flexible.
PortobellaRain replied on at Permalink Reply
<legend><?php echo t('Personal Details')?></legend>

$af = Loader::helper('form/attribute');

foreach($attribs as $ak) { ?>
<?php echo $set?>
<?php echo $af->display($ak, $ak->isAttributeKeyRequiredOnRegister()); ?>

<?php }?>

I have found the fieldset within the register.php file, looking also at the group_sets.php file, I notice the necessary details to integrate into the register.php file.

What can I do to this section of code to ensure that the attributes are displayed and also the group_set variables which at present I believe is marked down as $gs?

Any help would be massively appreciated.
PortobellaRain replied on at Permalink Reply

would really appreciate any help on this. Will be working all day today to ensure this is fixed.


PortobellaRain replied on at Permalink Reply
apologies, got to keep this live until I find a solution. Really stuck.
hissy replied on at Permalink Reply
$category = AttributeKeyCategory::getByHandle('user');
if (is_object($category) && $category->allowAttributeSets()) {
   $sets = $category->getAttributeSets();
   foreach($sets as $as) {
      <h3><? echo $as->getAttributeSetDisplayName()?></h3>
      $attribs = $as->getAttributeKeys();
      if (count($attribs) > 0) {
         foreach($attribs as $ak) {
            $af = Loader::helper('form/attribute');
            echo $af->display($ak, $ak->isAttributeKeyRequiredOnRegister());