function conditional_fields_form_clean_id in Conditional Fields 6
Same name and namespace in other branches
- 6.2 conditional_fields.module \conditional_fields_form_clean_id()
form_clean_id in Drupal 6 adds a unique ID check, which messes things up here Since fields have unique names anyway, we can safely use this wrapper (I hope).
3 calls to conditional_fields_form_clean_id()
- conditional_fields_form_alter in ./
conditional_fields.module - Implementation of hook_form_alter().
- conditional_fields_node_editing_form in ./
conditional_fields.module - Alteration of the node editing form
- theme_conditional_fields_form_item in ./
conditional_fields.module - Themes the wrappers around conditional fields. Note that if you modify the id and classes of these fields, you have to modify conditional_fields.js accordingly.
File
- ./
conditional_fields.module, line 1180 - Content fields and groups visibility based on the values of user defined 'trigger' fields.
Code
function conditional_fields_form_clean_id($id) {
$id = str_replace(array(
'][',
'_',
' ',
), '-', $id);
return $id;
}