function webform_protected_downloads_get_mandatory_field_name in Webform Protected Downloads 7
Retrieve the name used to access the "Required" form element for webform components. This has been named "mandatory" in all webform versions prior to 7.x-4.0-alpha7.
Return value
string
See also
https://drupal.org/node/1609324#webform-required
2 calls to webform_protected_downloads_get_mandatory_field_name()
- webform_protected_downloads_configuration_form in ./
webform_protected_downloads.form.inc - Form callback for the webform configuration subpage
- webform_protected_downloads_form_alter in ./
webform_protected_downloads.module - Implementation of hook_form_alter().
File
- ./
webform_protected_downloads.module, line 1230 - This file contains hook declarations and functions for the Webform Protected Downloads module.
Code
function webform_protected_downloads_get_mandatory_field_name() {
include_once DRUPAL_ROOT . '/includes/install.inc';
if (drupal_get_installed_schema_version('webform') >= 7408) {
return 'required';
}
else {
return 'mandatory';
}
}