function _wfm_get_max_items in Webform Multiple (WFM) 7
Get the max_items of a component.
This is the equivalent of 'cardinality' in the Field system.
4 calls to _wfm_get_max_items()
- wfm_add_more_submit in ./
wfm.module - Submit callback for the 'Add another item' button.
- wfm_form_webform_component_edit_form_alter in ./
wfm.module - Implements hook_form_FORM_ID_alter().
- _wfm_is_multiple in ./
wfm.module - Check whether a component takes multiple values.
- _wfm_process_elements in ./
wfm.module - Process an element in the Webform to allow multiple values.
File
- ./
wfm.module, line 737 - Main module file for Webform Multiple (WFM).
Code
function _wfm_get_max_items(array $component) {
$max_items = 1;
if (isset($component['extra']['wfm_max_items'])) {
$max_items = (int) $component['extra']['wfm_max_items'];
}
return $max_items;
}