function wf_crm_contact_component_required in Webform CiviCRM Integration 7.5
Same name and namespace in other branches
- 7.4 includes/contact_component.inc \wf_crm_contact_component_required()
Validation callback
Parameters
array $element:
array $form_state:
1 string reference to 'wf_crm_contact_component_required'
- _webform_render_civicrm_contact in includes/
contact_component.inc - Implements _webform_render_component().
File
- includes/
contact_component.inc, line 1188
Code
function wf_crm_contact_component_required($element, &$form_state) {
if (empty($element['#value'])) {
form_error($element, t('!name field is required.', [
'!name' => $element['#title'],
]));
}
}