Submit a custom form as a webform submission I have a custom form i created using FAPI and i wanted to submit the values into the webform  database table and/or content type as a node. i wasnt sure of the "drupal Way" of doin this. Here's my current submit  function, Please tell me if im doing this correctly or if not what is the correct way? (P.S. i dont want to use a different r another module or save to my own custom table.)

function contracts_webform_submit($form, &amp;$form_state) {
 module_load_include('inc', 'webform', 'includes/webform.submissions');
 module_load_include('inc', 'webform', 'includes/webform.components');
 global $user;

$node = $form['#node'];
$sid = $form_state['values']['details']['sid'] ? (int) $form_state['values']['details']['sid'] : NULL;

// If there is no data to be saved (such as on a multipage form with no fields
// on the first page), process no further. Submissions with no data cannot
// be loaded from the database as efficiently, so we don't save them at all.
if (empty($submission-&gt;data)) {
 return;
}

 // Save the submission to the database.
if (!$sid) {
 // No sid was found thus insert it in the dataabase.
 $form_state['values']['details']['sid'] = $sid = webform_submission_insert($node, $submission);
 $form_state['values']['details']['is_new'] = TRUE;

 drupal_set_message(t('The form has been submitted.'));
 }
}
Without really knowing much else about the custom requirements of your form it's difficult to give a complete answer however your on the right track by using Webform.

You should recreate as much of the form as you can using webform as a base rather than FAPI. Then you can use FAPI to alter (hook_form_alter) the existing form that webform outputs.

Your custom FAPI code can then be worked into the way webform works, you may have to massage some of the data based on your requirements though.