'import' => 1,
'custom_field_id' => $id,
'options_per_line' => CRM_Utils_Array::value('options_per_line', $values),
+ 'text_length' => CRM_Utils_Array::value('text_length', $values, 255),
'data_type' => CRM_Utils_Array::value('data_type', $values),
'html_type' => CRM_Utils_Array::value('html_type', $values),
'is_search_range' => CRM_Utils_Array::value('is_search_range', $values),
if (isset($query->_fields[$field]['data_type'])) {
switch ($query->_fields[$field]['data_type']) {
+ case 'String':
+ $length = empty($query->_fields[$field]['text_length']) ? 255 : $query->_fields[$field]['text_length'];
+ $sqlColumns[$fieldName] = "$fieldName varchar($length)";
+ break;
+
case 'Country':
case 'StateProvince':
case 'Link':
- case 'String':
$sqlColumns[$fieldName] = "$fieldName varchar(255)";
break;