Ajax Form submission with email

I am stepping over my own feet here. I have created an ajax form submission that stores to a db. Now I need to get an email notification sent to the site admin.

Here is the code producing an ajax error each time I submit the form:

<?php
/**
* FORM API
*/

/*
* Implements hook_menu()
*/
function contact_menu() {
$items['contact'] = array(
'title' => 'View the sample form',
'page callback' => 'drupal_get_form',
'page arguments' => array('contact_nameform'),
'access callback' => TRUE,
'type' => MENU_NORMAL_ITEM
);
return $items;
}
/*
* Implements hook_theme
*/
function contact_theme() {
return array(
'contact_nameform' => array(
'render element' => 'form',
'template' => 'contact_nameform',
),
);
}

/*
* Assign the elements of the form to variables
*/
function template_preprocess_contact_nameform(&$variables) {
$variables['contact_nameform'] = array();
$hidden = array();
//Provides variables named after form keys
foreach (element_children($variables['form']) as $key) {
$type = $variables['form'][$key]['#type'];
if ($type == 'hidden' || $type == 'token') {
$hidden[] = drupal_render($variables['form'][$key]);
}
else {
$variables['contact_nameform'][$key] = drupal_render($variables['form'][$key]);
}
}
// Hidden form elements have no value to the theme

drupal7.2 url error??

[SAVE] user info:
back:/admin/people
is not /?q=/admin/people
php is not URL Rewrite on.

Two-Step Selection in Taxonomy

What I want to do is relatively simple but the assortment of modules available makes "the right answer" harder to find. After reading about Views, an assortment of Taxonomy filters and Finder I decided it was better to ask.

I want to do selection from two taxonomies, one step at a time. I will offer the "making a sundae" example to show what I am talking about.

How to Develop a Social Network with Drupal 7

Hello,

I'm trying to develop a social network that caters to gamers. Essentially what I would like to create is something similar to facebook, combined with a more traditional gamer review site.

I would like some advice on what modules to use, and some recommended tutorials.

If anyone can help point me in the right direction, I would appreciate it.

~Chris

Is it a multisite? - school website has to be divided by to categories.

I'm presently working on a school website and I have one dilemma. The school is divided by gender and the content has to be in two languages.

The language part is fine no problem, but to divide the content by gender is a more difficult approach. I would like to have different main-menus etc..

Can anybody suggest how to approach this problem ? Is the only way out is Multisite?

Thank you.

Drupal 7.0 post installation error message

After installing Drupal 7.0, I went to visit the site and got the message: fatal error: class 'pdo' not found in /home/wwwtan/public_html/drupal/includes/database/database.inc on line 185. Any advice on how to fix this? I used a one step installation process from a control panel on my hosting server. Thanks. - Tina

Pages

Subscribe with RSS Subscribe to RSS - Drupal 7.x