You are here

function _fieldset_helper_format_id in Fieldset helper 6.2

Same name and namespace in other branches
  1. 6 fieldset_helper.module \_fieldset_helper_format_id()

Formats any string as a valid fieldset id.

Parameters

$text: A string to be converted to a valid fieldset id.

Return value

The string format as a fieldset id.

2 calls to _fieldset_helper_format_id()
fieldset_helper_alter_theme_fieldset in ./fieldset_helper.theme.inc
Alters a fieldset element to set default attributes, state, and id.
_fieldset_helper_set_fieldset_ids_recursive in ./fieldset_helper.module
Recursively set a fieldset ids based on the associated array keys.

File

./fieldset_helper.module, line 223

Code

function _fieldset_helper_format_id($text) {
  return form_clean_id(preg_replace('/[^a-z0-9]+/', '-', drupal_strtolower($text)));
}