diff --git a/README.md b/README.md index ea6d5a5..60a6c7a 100644 --- a/README.md +++ b/README.md @@ -108,6 +108,14 @@ To view Channel Entries that a member has been selected in (via a VMG Chosen Mem > Returns all relevant entries. If **display\_entries** = "no", outputs the prefixed {entry_ids} tag. +### Usage with Channel Form / SafeCracker + +In order to correctly render the Chosen field within Channel Form or SafeCracker, you will need to ensure that the field assets are loaded. Simply include the following tag somewhere on your page: + +`{exp:vmg_chosen_member:init_ft type="css|js"}` + +Note that you can pass a `type` parameter to render the CSS, JS, or both. + ### Support for other fieldtypes/add-ons VMG Chosen Member can be used within [Matrix](http://pixelandtonic.com/matrix/), [Low Variables](http://gotolow.com/addons/low-variables/), and [Better Workflow](http://devot-ee.com/add-ons/better-workflow/). diff --git a/ee2/third_party/vmg_chosen_member/helper.php b/ee2/third_party/vmg_chosen_member/helper.php index 74146e9..88ba015 100644 --- a/ee2/third_party/vmg_chosen_member/helper.php +++ b/ee2/third_party/vmg_chosen_member/helper.php @@ -510,7 +510,7 @@ public function initData(&$obj) 'is_draft' => ($is_draft ? 1 : 0), ); - $obj->ft_data['cache_key'] = md5("{$obj->ft_data['entry_id']}_{$obj->ft_data['field_id']}_{$obj->ft_data['col_id']}_{$obj->ft_data['var_id']}"); + $obj->ft_data['cache_key'] = md5("{$obj->ft_data['field_id']}_{$obj->ft_data['col_id']}_{$obj->ft_data['var_id']}"); return $obj->ft_data; }