1

Once the webform is submitted, I need it to be redirected to edit form page where user can edit that form again.

I know is at webform->components->form settings and choose custom redirect. What is the value I should key in (since form ID is always different)?

3 Answers 3

3

There are number of ways to do this:

  1. Use rules on event "After saving a node" -> condition : "node is of type webform" -> action : "add redirect" ; path : node/[nid]/webform. Note: [nid] might not be the exact token, but you'll get the exact token in the replacement patterns in the Rules UI.
  2. Implement hook_node_insert in your custom module which triggers after every new node is created, check for the $node->type if it is of type webform, and use drupal_goto to redirect to the form components page. Path node/{$node->id}/webform.
  3. Alter the node_form for webform to add a submit handler and use
    form_state['redirect'] = 'node' . $form_state['nid'] . '/webform';
1

The easiest way to achieve this is to go to the Webform settings configuration page i.e www.example.com/node/[nid]/webform/configure.

There under the Redirection location settings, you can add the Custom URL with the required tokens i.e node/[node:nid]/submission/[submission:sid]/edit.

Please make sure that token module is installed and the permissions allow the user to edit the submission.

0

I use webform rule to solve my issue. Just need to install webform rule module.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.