Possible bug in Multi Drop-down List with EE 1.6.4.
While in the Edit window, clicking the Preview button de-selects the selected Multi Drop-down list items. The same thing occurs with the Checkboxes extension.
So this extension is the best thing since sliced bread, but I am having one slight issue:
I made a drop-down to add authors to the list in this format: “Smith, J.” Unfortunately, when using {input} to add a new author it does NOT like having a comma in there! It tries to interpret this as two entries.
Anyone know how to change this setting in the extension’s PHP code??
Is there any way to make this work with custom member fields?
I have it installed and see the option to make custom weblog fields multi-select. But, multi-select isn’t an option when editing a custom member field.
It would be great to get this working with members, too.
Just if it helps anyone, here is my approach to testing for values:
On my template:
<?php if(!(in_array("ITEM01", string_to_array("{custom-field-name}", ",")))) { ?> <p>... If "ITEM01" is NOT in the array of selected items, then show this code ...</p> <?php } ?>
My functions:
<?php
// @about: Trim beginning and ending white space from referenced $value. // @ref: http://us2.php.net/trim function trim_key_value(&$value) { $value = trim($value); }
// @about: Convert delimited string to array. // @param 01: Delimited string to convert. // @param 02: Delimiter to explode. function string_to_array($str, $delimiter) { $return = explode(",", $str); // Convert delimited string to an array. array_walk($return, 'trim_key_value'); // Remove white spaces from array keys. return $return; // Return results. }
?>
(I include my functions at the head of my master template. PHP set to output for template that has function call.)
Read the first technical note on this page to give you an idea of other situations one would want to use HTML entities. Could be a similar fix in your situation?
? The issue is with the Publish Page, so I’d have to change Mark’s PHP extension file. What line in that code? I have no idea! Ha. Would this be in the “seperator” section?
Alternatively, you could just change the separator via the extension’s options. Instead of using a comma to separate the items, use a pipe “|” character?
You could even use a little PHP to turn the pipes back to commas, if that is your goal.
Or, use PHP to convert the commas, in your list of names, into , before using this plugin:
Where’s the documentation for this extension? I’m trying to use the multi-select and have it display as a unordered list. How do I do this? I managed to install the extension but do not know how to use it in the template.
Anyone know what the field type is for multiselect? I’m making a user blog submission template ( http://expressionengine.com/docs/modules/weblog/entry_form.html ), and of course it’s got areas for things like pulldown and such. I’ve tried multiselect, but it’s not happening. Works fine from the control panel’s publish area. Anyway know?