I have added a large number of custom user profile fields (about 60) using the profile module and would like to improve the layout of the User Search page. Currently, each field is displayed on a new line, how would I go about making more efficient use of the screen real estate (e.g. perhaps I could double up the fields so that two appear per line)?
I have been told that I need to edit the function "theme_user_search_advanced" in the user_search module. However, whilst I have just got to grips with what the php code in that function is doing, I am still unclear as to how to position the form elements, apart from by adding .form-item { display: inline; }
to my phpTemplate theme's style.css file (and this doesn't look pretty!).
As you can see from the code below, the form is being generated using the following drupal functions: form_select, form_textfield, form_checkbox, form_group, form_submit and form.
Any help would be greatly appreciated.
<?php
function theme_user_search_advanced($profile_fields, $form_values) {
// set up the sort order
$sort_order = variable_get('user_search_order', array());
if (empty($sort_order)) {
$order = user_search_profile_fields('category', 'category');
foreach($order as $category) {
$sort_order[$category] = 0;
}
}
asort($sort_order);
$username .= form_textfield(t('Username'), 'name', check_plain($form_values['name']), 20, 64);