Position of Usergroup Selector

4 years 9 months ago #1 by hassan
Currently the Usergroup Selector appears at the bottom of the registration form
Can we somehow place it on the top , before any other option ?
4 years 9 months ago #2 by Function90
You can do it, but you need to override the registration template, after that you can do it in below way.

1: Change the html sequence of rendering the core fields and optional field.

Or

2: You can plans a select box in this template and remove the code of rendering extra fields.

Let me know if any confusion is there.

Thank you
Team Function90
You can share your views regarding our extension at JED ( extensions.joomla.org/profile/profile/details/225115#extensions )

Hire Professional Joomla Developers. ( www.function90.com/contact-us.html )
4 years 8 months ago #3 by hassan
New to Joomla
So can you elaborate on them ,
I think the first one seems easier , so how exactly do i do that ?
4 years 8 months ago #4 by Function90
Hello,

Copy the file Root / components / com_users / view / registration / tmpl / default.php to Root / templates / yourSelectedTemplate / html / com_users / registration / default.php.

If this file is already there then need not to copy the above file. Now edit the file and there is a section of placing optional fields, you just need to place that code, above of core registration fields.

Thank you
Team Function90
You can share your views regarding our extension at JED ( extensions.joomla.org/profile/profile/details/225115#extensions )

Hire Professional Joomla Developers. ( www.function90.com/contact-us.html )
3 years 4 months ago #5 by pascal
Hello i override the template but i have a foreach how can i display the user group on the top no on the bottom


<form id="member-registration" action="<?php echo JRoute::_('index.php?option=com_users&task=registration.register'); ?>" method="post" class="form-validate form-horizontal well" enctype="multipart/form-data">
<?php // Iterate through the form fieldsets and display each one. ?>
<?php foreach ($this->form->getFieldsets() as $fieldset): ?>
<?php $fields = $this->form->getFieldset($fieldset->name);?>
<?php if (count($fields)):?>
<fieldset>
<?php // If the fieldset has a label set, display it as the legend. ?>
<?php if (isset($fieldset->label)): ?>
<legend><?php echo JText::_($fieldset->label);?></legend>
<?php endif;?>
<?php // Iterate through the fields in the set and display them. ?>
<?php foreach ($fields as $field) : ?>
<?php // If the field is hidden, just display the input. ?>
<?php if ($field->hidden): ?>
<?php echo $field->input;?>
<?php else:?>
<div class="control-group">
<div class="control-label">
<?php echo $field->label; ?>
<?php if (!$field->required && $field->type != 'Spacer') : ?>
<span class="optional"><?php echo JText::_('COM_USERS_OPTIONAL');?></span>
<?php endif; ?>
</div>
<div class="controls">
<?php echo $field->input;?>
</div>
</div>
<?php endif;?>
<?php endforeach;?>
</fieldset>
<?php endif;?>
<?php endforeach;?>
3 years 4 months ago #6 by Function90
Hello Pascal,

Replace the below code of your code
<?php foreach ($this->form->getFieldsets() as $fieldset): ?>

with
<?php $fieldsets = $this->form->getFieldsets();?>
<?php $fieldsets = array_reverse($fieldsets); ?>
<?php foreach ($fieldsets as $fieldset): ?>

Thank you
Team Function90
You can share your views regarding our extension at JED ( extensions.joomla.org/profile/profile/details/225115#extensions )

Hire Professional Joomla Developers. ( www.function90.com/contact-us.html )
Powered by Kunena Forum