OK kinda noob-ish question but im unfamiliar with the programing side of Drupal... Im currently building a Form from scratch in drupal 7 (custom module since im using Form_Panel to arrange my form fields) and i would like to implement the webform API into my code as the submit handler.(This way i can hopefully use webform UI to deal with submissions and viewing results at least) Currently i have all the form fields and a submit button but not much else...
function my_module_menu() {
$items = array();
$items['my_module/form'] = array(
'title' => t('Subscription'),
'page callback' => 'my_module_form',
'access arguments' => array('access content'),
'description' => t('Subscription'),
'type' => MENU_CALLBACK,
);
return $items;
//some random fields from form API after
///////////////////////////////////////////////////
////////////////// Submit button
$form['submit'] = array(
'#type' => 'submit',
'#value' => 'Submit',
'#submit' => array('my_module_my_form_submit'),
);
return $form;
}
function my_module_my_form_submit($edit,$form, $form_state) {
drupal_set_message('Submission recieved.');
}
And thats it.It shows perfectly on site and submit refreshes the page.. What i need to know is which function and methods should i use to get webform or drupal period to save my values(create a db table first?) and display them at the necessary time through whatever links on the site.