This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Author Information Block info on Gallery 2 user album/item

I am very close to achieving lift-off with my new site with many thanks to the Drupal and Gallery developers but I have one request or maybe it is just a little shove in the right direction. I would like to display the Author Information block on the Gallery 2 album/item page for that user. Possible?

Webform Module - Mandatory Select elements not being checked

Hi all,
The Webform module seems to be a great little module for creating surveys/webform etc. However, I have run into one problem that I cannot seem to fix, even with a hack of the Core. For some reason, if you make a checkbox/dropdown/select list a mandatory field on a Webform, it will show up as required (red *), but when you submit with no checkboxes selected, they are not throwing errors and the webform is submitting without error.

Is there any known way around this, or am I not doing something correctly?

Thanks,
-Benson

Accessing fields of form elements

Hi, being not an experienced drupal developer, here is my query. Within the hook_form() of my module, I define a "radios" form element:

 $form['cocivote'] = array(
                            '#type' => 'radios',
                            '#title' => t('Rate This'),
                            '#default_value' => '2',
                            '#theme' => 'radios5starvote',
                            '#description' => t(''),
                            '#options' => array('1','2','3','4','5'),
                            '#weight' => 6,
                            '#required' => TRUE);  

As you noticed, I want a custom theme function to format the output for this radios. So, in my template.php (PHPTemplate engine), I define the radios5starvote as follows:

function phptemplate_radios5starvote($element){
   // here comes custom output
}

Now, my problem is the following: the radios element is a grouped element, i.e. containing multiple '#title' fields, multiple '#required' fields etc. For instance, the parent element has a '#title' fields and also every radio element has a '#title' field as well.

For my output though, I need to be able to process the element and retrieve e.g. the title of the parent only (to output as the title of all radios). As the form array is flattened, I don't see how to be able to access the desired title field. Are there any FORMS API functions that provide such functionality?

Multiedit or multidelete

I need to do a multiedit page. Now it's written like node_admin_nodes. But what is more perfomance in this situation: to pass all necessary values through form ('#type' => hidden' or '#type' => value), or make a db_query?

In the second case another question: if I need to do a lot of db_queries for each item id or take all of them and then filter item, which I need?
In node.module the second of three (which I have described) method used.

PS Maybe, something is more effective... I ned to select from 1 to 150 elements from 1000 - 1500 elements table.

Multiedit or multidelete

I need to do a multiedit page. Now it's written like node_admin_nodes. But what is more perfomance in this situation: to pass all necessary values through form ('#type' => hidden' or '#type' => value), or make a db_query?

In the second case another question: if I need to do a lot of db_queries for each item id or take all of them and then filter item, which I need?
In node.module the second of three (which I have described) method used.

PS Maybe, something is more effective... I ned to select from 1 to 150 elements from 1000 - 1500 elements table.

Blog Posts

Hello Everybody,

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions