summaryrefslogtreecommitdiff
path: root/includes/form.inc
diff options
context:
space:
mode:
Diffstat (limited to 'includes/form.inc')
-rw-r--r--includes/form.inc31
1 files changed, 0 insertions, 31 deletions
diff --git a/includes/form.inc b/includes/form.inc
index 9121a35a8..babd18b49 100644
--- a/includes/form.inc
+++ b/includes/form.inc
@@ -3662,37 +3662,6 @@ function form_pre_render_fieldset($element) {
/**
* Creates a group formatted as vertical tabs.
*
- * Note that autocomplete callbacks should include special handling as the
- * user's input may contain forward slashes. If the user-submitted string has a
- * '/' in the text that is sent in the autocomplete request, the menu system
- * will split the text and pass it to the callback as multiple arguments.
- *
- * Suppose your autocomplete path in the menu system is 'mymodule_autocomplete.'
- * In your form you have:
- * @code
- * '#autocomplete_path' => 'mymodule_autocomplete/' . $some_key . '/' . $some_id,
- * @endcode
- * The user types in "keywords" so the full path called is:
- * 'mymodule_autocomplete/$some_key/$some_id/keywords'
- *
- * You should include code similar to the following to handle slashes in the
- * input:
- * @code
- * function mymodule_autocomplete_callback($arg1, $arg2, $keywords) {
- * $args = func_get_args();
- * // We need to remove $arg1 and $arg2 from the beginning of the array so we
- * // are left with the keywords.
- * array_shift($args);
- * array_shift($args);
- * // We store the user's original input in $keywords, including any slashes.
- * // Note: A prepended or trailing slash will be removed. For example, if the
- * // user enters '/a/few/words/' then $keywords will contain 'a/few/words'.
- * $keywords = implode('/', $args);
- *
- * // Your code here.
- * }
- * @endcode
- *
* @param $element
* An associative array containing the properties and children of the
* fieldset.