You are here

function conditional_fields_form_clean_id in Conditional Fields 6.2

Same name and namespace in other branches
  1. 6 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).

4 calls to conditional_fields_form_clean_id()
conditional_fields_add_more_post_render in ./conditional_fields.module
post_render function to handle controlled fields after "add more" ahah request
conditional_fields_item_apply_theme in ./conditional_fields.module
Insert appropriate themeing functions in a conditional field form element.
conditional_fields_node_after_build in ./conditional_fields.module
Main tasks:
theme_conditional_fields_form_item in ./conditional_fields.module
Prepares conditional fields for rendering and handles special cases. 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 1502
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;
}