You are here

function _wfm_get_add_text in Webform Multiple (WFM) 7

Get the sanitized 'add more' text of a component.

Default: 'Add another item'.

2 calls to _wfm_get_add_text()
wfm_form_webform_component_edit_form_alter in ./wfm.module
Implements hook_form_FORM_ID_alter().
_wfm_process_elements in ./wfm.module
Process an element in the Webform to allow multiple values.

File

./wfm.module, line 763
Main module file for Webform Multiple (WFM).

Code

function _wfm_get_add_text(array $component) {
  $add_more_text = t('Add another item');
  if (isset($component['extra']['wfm_add_more_text'])) {
    $add_more_text = check_plain($component['extra']['wfm_add_more_text']);
  }
  return $add_more_text;
}