Closed (fixed)
Project:
Webform2Sugar
Version:
7.x-5.0-alpha1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2012 at 22:47 UTC
Updated:
19 Feb 2013 at 08:00 UTC
Having the following two messages pop up for each data field entered, once the Submit button is pressed in Drupal 7.17. Sugar Version 6.5.7 (Build 8576)
Notice: Undefined index: value in webform2sugar_webform_submission_insert() (line 92 of /www/drupal/sites/all/modules/webform2sugar/webform2sugar.module).
Warning: Invalid argument supplied for foreach() in webform2sugar_webform_submission_insert() (line 96 of /www/drupal/sites/all/modules/webform2sugar/webform2sugar.module).
Drupal to Sugar CRM Mapping Image
Note: A new lead record is created in SugarCRM, but it does not contain any data.
Comments
Comment #0.0
aharding commentedAdded photos
Comment #0.1
aharding commentedAdditional info
Comment #1
omidtak commentedI had the same errors and was inserting blank fields into sugarcrm. I got it to work with the latest drupal 7.19 and webform 7.x-4.0-alpha6
edit the file:
and change line 92 from: webform2sugar.module
$formvalues = $submission->data[$sugar_component->cid]['value'];
to:
$formvalues = $submission->data[$sugar_component->cid];
basically only remove ['value'] at the end and it should start working.
of course this is not upgrade safe.
Comment #2
rurri commentedGreat info.
Looks like we can make a check to see if the value is stored in value or not, and dynamically use one or the other.
Comment #3
rurri commentedCan confirm that this was introduced in the newest version of webform.
Modified webform2sugar to check for array key and use appropriate value.
This allows module to work on both webform 7.3 and 7.4
Comment #4.0
(not verified) commentedAdded Sugar Version