Hi,

My case is very simple that:

- Each user has to fill up a webform during registration
- Two different webforms
- Each user chooses his/her form depending on what role he/she holds (suppose the names of roles are: A,B,C,D,authenticated user, anonymous user)
- Each user only allow one and exact one submission
- Each user is prohibited to delete any form, including his own submission.
- Each user only allow edit his own form

I tried to implement it as:

/**
 * Implementation of hook_user().
 */

function webform_user($op, &$edit, &$account, $category = NULL) {
  switch ($op) {
    case 'register':
      $form['webform'] = webform_form(&$node, &$param); // <- what should I fill in &$node and &$param?
        return $form;
      breakl;
  }  
}

Thanks a lot.

Comments

quicksketch’s picture

Category: feature » support
Status: Active » Closed (fixed)

Support for writing custom code is not provided in the Webform issue queue.

rahulbile’s picture

you can try node_load hook !!