You are here

updating webform from 2.x to 3.x

There are two changes that need to be made. The first of them simple:

functions in webform.submissions

  • The line:
    include_once(drupal_get_path('module', 'webform') .'/webform_submissions.inc');
    needs to be changed to:
    module_load_include('inc', 'webform', 'includes/webform.submissions');

switch to hook_form_alter() for modifying the form

  • Documentation is here: drupal.org/node/1291574
  • But unfortunately there are no examples of how to actually change the data
  • However, it is very similar to the old $form_values, but now use $form_state['values']
    e.g.:
  $form_state['values']['submitted_tree']['facility'] =  $facilityid_name; //email
  $form_state['values']['submitted'][23] = $facilityid_id; // database

Some other useful links:

Topic: