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

How to generate a page with results after a form has been processed

Hello,

I wanted to know what is the best way of passing some data at the end of a form_submit () call.

I am using Drupal 5.1's form API. My goal is very simple: to make a form which do some computation and displays a page with the results.

form_submit() function finishes on a redirection and I do not know how to transmit my results.

I thought of two solutions:

Can you create a region from a module?

Hi, I'm creating a module that needs to add some HTML code to the head of pages and before the closing body, so far I've done it using drupal_set_html_head() and hook_footer() in my hook_menu().

I need to do it from my module because I don't want to require the site administrator to create a custom theme, even if it just needs a few lines of HTML in page.tpl.php.

I thought hook_init was supposed to be called for *every* page view, cached or not?

Is something broken? If I stick this in a module (any module which doesn't already have an _init function);

function modulename_init() {
global $user;
if (!$user->uid) watchdog('modulename', 'test of hook_init');
}

Now I would expect seeing as the docs on Drupal API say;

Only use this hook if your code must run even for cached page views.

Users can submit articles?

Is there a module where every registered user can add articles and when they submit it, there pending for administrator aproval? And also the option to choose the category to submit the article in? I've searched the modules database, but there is sooooo much. ;) Maybe someone could point me in the right direction

Node Array for View Output

I'm wondering what the most convenient way (if there is a good way) for retrieving the results of a view AS simply an array of nodes. The node array doesn't need to have all the info in it as that is available using node_load. It seems that all of the 'out of the box' functionality only provides views as already themed, but not in a more raw format. Looking at views_build_view() it appears that in order to do this I may have to go about this by starting with constructing a query. Essentially starting from scratch.

Is there a better way?

TIA

Mike

Webform mysql help

In the following drupal table 'webform_submitted_data' of the webform module the date 12/8/2007 is specified via 3 records ie:

2 1176718828 0 12
2 1176718828 1 18
2 1176718828 2 2007

I need to be able to select a sid that value matches a certain date. In the above example the sid value would be '2' if I wanted to select with date '12/8/2007'. I was wondering if there was a mysql (4.1.21-standard) SQL statement I could use select all the distinct sid values that match a certain date. The following is an example of a 'webform_submitted_data' table:

Pages

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