You are here

function _fieldset_helper_format_id in Fieldset helper 6

Same name and namespace in other branches
  1. 6.2 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.module
Theme related function that is used by the phptemplate_fieldset() function (in fieldset_helper.theme.inc) to alter the fieldset so that its collapsible state can be saved.
_fieldset_helper_set_collapsible_fieldset_ids in ./fieldset_helper.module
Set a collapsible fieldset's id based on the associated array keys.

File

./fieldset_helper.module, line 224
Saves the collapsed state of a Drupal collapsible fieldset.

Code

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