Drupal 4.6.5
Hi there,
I have added a number of custom user profile fields using the Profile module. It looks a bit untidy, so I'm trying to modify the layout of the registration page. I think I've found the correct section of code in the profile.module file, and as a test I wanted to modify the width of a text field - because it's way too wide. However, in the case statement, there is nothing next to the case 'textfield'
entry (see below). I've searched for the form_textfield that would generate custom single-line textfields but cannot find it - am I missing something here?
<?php
function profile_form_profile($edit, $user, $category) {
if (($_GET['q'] == 'user/register') ? 1 : 0) {
$result = db_query('SELECT * FROM {profile_fields} WHERE register = 1 ORDER BY category, weight');
}
else {
$result = db_query("SELECT * FROM {profile_fields} WHERE LOWER(category) = LOWER('%s') ORDER BY weight", $category);
// We use LOWER('%s') instead of PHP's strtolower() to avoid UTF-8 conversion issues.
}
$fields = array();
while ($field = db_fetch_object($result)) {
$category = $field->category;
switch ($field->type) {
case 'textfield':
case 'url':
$fields[$category] .= form_textfield(check_plain($field->title), $field->name, $edit[$field->name], 70, 255, _profile_form_explanation($field), NULL, $field->required);