In webform 7.x-4.10 I created a module like this:
function webform_presave_webform_submission_presave($node, &$submission) {
if ($webform->nid == 28) {
$component_id = 1;
$submission->data[$component_id]['value'][0] = 'Yes';
}
}
My webform with nid 28 has only one field, a texfield with a default value to "No".
When the webform is submitted, the value of the field is not change...
What am I doing wrong?