Its seems problem with multiselect fields in forms they are not adding in Lead when submitting form. It’s bug or I’m missing something?
Issue
Create custom multiselect filed in Studio for Leads module after that create new web to lead form which includes that filed and after publish it somewhere. After open that form fill all fields and submit form, data from mutiselect fields isn’t adding to the database.
Expected Behavior
Multiselect fileds must be added to system DB like other form data types (input, select, etc).
Environment
SuiteCRM Version used: 7.8.3
Browser name and version: Safari 10.1.1
Environment name and version: Apache + MySQL5.7.18 + PHP7.0.15
Operating System and version: Ubuntu 16.04
There are also errors in Apache error log file when submitting form:
[Wed May 31 03:38:54.552654 2017] [fcgid:warn] [pid 9420] [client ] mod_fcgid: stderr: PHP Warning: mysqli_real_escape_string() expects parameter 2 to be string, array given in /home/drm/public_html/include/database/MysqliManager.php on line 260, referer: https://forms.mysite.net/
[Wed May 31 03:38:54.552656 2017] [fcgid:warn] [pid 9420] [client ] mod_fcgid: stderr: PHP Warning: urlencode() expects parameter 1 to be string, array given in /home/drm/public_html/modules/Campaigns/WebToPersonCapture.php on line 208, referer: https://forms.mysite.net/
What is the Name of Multiselect field on Webform and on the CRM Side?
What values do you see after you POST the form and Print the values in the Log? can you share the POSTed data
The name of the multiselect field on Web & CRM side both is role_c
It’s a bit of odd behaviour as when i hit submit the following requests gets triggered:
Redirect URL does transfer control back to the Form page or the URL set for the Redirect. If you enable DEBUG on suitecrm and post the contents, what do you see in the logs?
WebtoPerson Capture file is located at modules/Campaigns/WebToPersonCapture.php
You can put some debug code to log the values.