Drupal is up and running but how do I ...?

Layout of custom profile fields on advanced user search page (user_search module)

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);

How do I omit operators (AND, OR and NOT) from user_search form?

Drupal 4.6.5

Hi there,

How do I hide the "operator" drop-down boxes that contain AND, OR and NOT from the user_search module's form?

I've tried commenting out the form_select line which creates these "operator" drop-down boxes but this causes a SQL error.

Does anyone know how I can achieve this?

Your help would be much appreciated.

blank site, white pages

Hello, I was just about to pose a question when I found what I thought might be the solution, so I thought I'd try it before troubling the forum... but it destroyed my site!

here's the culprit: http://drupal.org/node/58861
which I added as a new block and then enabled...

How to mail to recent members only?

Hi all,

I'm having great fun in building a community with drupal.. now I have a little problem, in the sense that I would like to email all my newest members each week to welcome them to the site etc...

How can I do that?? Any ideas which functions, modules I should use?

Thanks

webform (v4.7.x) problem ;( Help

Hello,
I am really pleased with my new Drupal installation, but am having problems with the webform module ;(

On the modules page here I downloaded webform (4.6.) which was linked under the webform link I got through the 4.7. filter.
I was a little confused, so I did it twice with the same result.
Since I am a bloody young drupal fellow, i thought that maybe the module version num doesn't have anything to do with the drupal version and installed it (incl. the tables needed using phpMyAdmin).
Since it didn't work I checked again and after clicking "view other releases" I found the 4.7. version which funily enough isn't marked as latest version (after a bunch of rtfm I know why, but it is a bit confusing ;))

Anyways, I then deleted all the webform tables out of my drupal DB. Same was done to the 4.6. module parts .

Then I uploaded the 4.7. version into my modules Folder and activated the module.

Everything looked like it was working fine until I submitted my first form, which came up with this:

* user warning: Table 'drpl_4_7_2.webform' doesn't exist query: SELECT * FROM webform WHERE nid = 1 in /var/www/vhosts/xxxxxxxxxxxxxxxxx.de/httpdocs/html/includes/database.mysql.inc on line 120.

* user warning: Table 'drpl_4_7_2.webform_component' doesn't exist query: SELECT * FROM webform_component WHERE nid = 1 ORDER BY weight, name in /var/www/vhosts/xxxxxxxxxxxxxxxxx.de/httpdocs/html/includes/database.mysql.inc on line 120.

forms: howto automatically fill some fields based on the selection in a dropdown box

Hi,

I have the impression that the following should be easy with the forms API, but I can't directly find the best way to do this:

I have a certain form and I would like to automatically fill in some fields if a certain select field has changed.

In my case the purpose would be different, but I guess a typical example woud be that once a user selects his name from a drop down box, you look up in the database what you know about her/him and fill in the necessary fields (you may not have all the info though).

Pages

Subscribe with RSS Subscribe to RSS - Post installation