Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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
Comment #1
quicksketchSupport for writing custom code is not provided in the Webform issue queue.
Comment #2
rahulbile CreditAttribution: rahulbile commentedyou can try node_load hook !!