Closed (duplicate)
Project:
Drupal core
Version:
4.7.3
Component:
profile.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Oct 2006 at 13:07 UTC
Updated:
26 Oct 2006 at 07:26 UTC
Trying to build a custom profile field using list selection and lots of country names, like
Aland Islands
Andorra, Principality of
I found, that the list selection selection options field is split by linefeed, newline, and comma.
My selection list looks like:
Aland Islands
Andorra
Pricipality of
I think, splitting by linefeed/newline is enough, OR spliting by comma, but not both.
At least, the splitting functionality should be mentioned in the field description.
Removing the comma from the split command in profile.module solved my problem, so it reads now:
...
// line 662 - 668
case 'selection':
$options = $field->required ? array() : array('--');
$lines = split("[\n\r]", $field->options);
foreach ($lines as $line) {
if ($line = trim($line)) {
$options[$line] = $line;
}
}
...
(At line 555 there is another split function.)
Maybe it's a interesting idea to have the field delimiter configurable.
(A forum entry is found here: http://drupal.org/node/89106)
Comments
Comment #1
edmund.kwok commentedIssue marked duplicate in favor of patch submitted in http://drupal.org/node/90221.