check for existing $cid in components when going to dave data.
In some cases need to create, let's call them 'dummy-fields'. Them are of course not in components, so to prevent the annoying notice messages (undefined index) need to check if the $cid exists in components first.

please, review patch
thx, dropfen


dropfen’s picture

this simple patch

quicksketch’s picture

Title:Check for $cid in webform_submission_data» Check for $cid in webform_submission_data() to skip pseudo-fields
Status:Needs review» Fixed

Seems reasonable to me, though I don't particularly encourage adding pseudo-fields.

I adjusted the patch slightly since this line is missing a ">" character that would cause a PHP error:

+    if (!isset($node-webform['components'][$cid]) || $node->webform['components'][$cid]['type'] == 'pagebreak') {

$node-webform changed to $node->webform.

dropfen’s picture

oh my fault, the patch was made with vim in an untestable env. :) Sorry.
thx, for reviewing.

by the way, I need the pseudo field, which is a clone (with little modification) of the mail field, to check the input.

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.