_fieldset_helper_format_id

contrib-jrockowitz/fieldset_helper/fieldset_helper.module, line 229

Versions
6
_fieldset_helper_format_id($text)

Formats any string as fieldset id prepended with 'fieldset-'.

Parameters

$text A string to be converted to a fieldset DOM id;

Return value

TRUE if a form contains a collapsible fieldset.

▾ 2 functions call _fieldset_helper_format_id()

fieldset_helper_alter_theme_fieldset in contrib-jrockowitz/fieldset_helper/fieldset_helper.module
Theme related function that is used by the phptemplate_fieldset() function (in fieldset_helper.theme.inc) used to alter the fieldset so that its collapsible state can be saved.
_fieldset_helper_set_collapsible_fieldset_ids in contrib-jrockowitz/fieldset_helper/fieldset_helper.module
Set collapsible fieldsets id based on the associated array keys.

Code

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