The check function requires that a field mapping be set to show the fieldset on webform edit pages. However, it's not always necessary to create a mapping for SF to properly process the field names. (Many default fieldnames map correctly)
Also, the 'Salesforce Web-to-Lead Settings not set! ' warning message should probably be set as an error. (line 52 of sfweb2lead_webform.module)
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | change-required-settings-1555098-2.patch | 1.31 KB | vegantriathlete |
Comments
Comment #1
vegantriathleteNote: I have opened a separate issue for setting the warning message and will submit the patch for that.
Comment #2
vegantriathletePatch attached.
I have removed the requirement that there is at least one key value pair in the mapping fields. Now the fieldset appears on the content type to allow sending to salesforce whether or not mappings have been defined.
I have not changed any of the other logic that uses the variable that is retrieved (sfweb2lead_webform_mapping_settings) from the database as it did not appear to me that there would be any problem with the array being empty.
I have run an extremely basic test (webform that collects first_name and last_name) to ensure that the webform is still submitted properly to salesforce when no mappings are defined through the configuration page, i.e., all the webform fields map to the same names as the salesforce fields.
So, all appears to be okay to me with this patch. However, other people may want to beat on it more to see if I have overlooked any cases that would fail when then settings array is empty.
Comment #3
vegantriathleteAh, I forgot to change the version to the right one previously.
Comment #4
vegantriathleteCan't leave it assigned to myself. Other people need to RTBC.
Also, note that this patch seems to correct (or cause?) an issue with something about the newline at the end of file, which is also picked up with my other patch.
Comment #5
dago.aceves commentedI like the spirit of the patch and I'll give it some tests today. Thanks vegantriathelete.
Comment #7
chriscalip commentedComment #8
chriscalip commented