SMF Development > Applied or Declined Requests
extended details for new user registration
oston:
--- Quote from: emanuele on July 03, 2012, 05:00:54 AM ---mmm...wondering if this can be considered a bug...I'd consider it a bug...
If you have only "required" fields it could be easy (you can move the entire block upper in the template), otherwise if you have required and non-required fields it will need a bit more of work.
--- End quote ---
The additional information fields in the registration form are website title, website URL and my custom field. It's not necessary to include the website fields in the registration form, so YES, I only have "required" fields . Please could you give me more details about "moving the entire block upper in the template". I found the registration template, but my php skills are not up to modifying it without some help.
Thanks
Jim
emanuele:
--- Quote from: oston on July 03, 2012, 08:53:55 AM ---The additional information fields in the registration form are website title, website URL and my custom field.
--- End quote ---
Yep, I was thinking in general about "required" custom fields: would make more sense to have them in the "required" box instead of into the "additional info" box...
--- Quote from: oston on July 03, 2012, 08:53:55 AM ---It's not necessary to include the website fields in the registration form, so YES, I only have "required" fields . Please could you give me more details about "moving the entire block upper in the template". This is my very first encounter with forum software and I don't know the underlying structure yet.
--- End quote ---
In Register.template.php, find:
--- Code: (find) --- // Are there any custom fields?
if (!empty($context['custom_fields']))
{
foreach ($context['custom_fields'] as $field)
echo '
<dt>
<strong', !empty($field['is_error']) ? ' style="color: red;"' : '', '>', $field['name'], ':</strong>
<span class="smalltext">', $field['desc'], '</span>
</dt>
<dd>', $field['input_html'], '</dd>';
}
--- End code ---
and remove it.
Then find:
--- Code: (find) --- echo '
</fieldset>
<span class="botslice"><span></span></span>
</div>';
--- End code ---
and before add this:
--- Code: (add before) --- // Are there any custom fields?
if (!empty($context['custom_fields']))
{
foreach ($context['custom_fields'] as $field)
echo '
<dt>
<strong', !empty($field['is_error']) ? ' style="color: red;"' : '', '>', $field['name'], ':</strong>
<span class="smalltext">', $field['desc'], '</span>
</dt>
<dd>', $field['input_html'], '</dd>';
}
--- End code ---
that is exactly the piece you have removed in the first operation.
oston:
Many thanks. That worked well.
There's just a minor cosmetic issue that the box for the information is not aligned with the others, but it's not that important.
Jim
Navigation
[0] Message Index
[*] Previous page
Go to full version