function webform_clone_node_alter in Webform 7.4
Alter the node before saving a clone.
Parameters
object $node: Reference to the fully loaded node object being saved (the clone) that can be altered as needed.
array $context: An array of context describing the clone operation. The keys are:
- 'method' : Can be either 'prepopulate' or 'save-edit'.
- 'original_node' : The original fully loaded node object being cloned.
See also
File
- ./
webform.module, line 5443 - This module provides a simple way to create forms and questionnaires.
Code
function webform_clone_node_alter(&$node, array $context) {
if (isset($node->webform)) {
$defaults = webform_node_defaults();
$node->webform['next_serial'] = $defaults['next_serial'];
}
}