protected function WebformCivicrmBase::add_user_select_field_placeholder in Webform CiviCRM Integration 8.5
Add location_type_id = NULL for user-select fields for identification later
Parameters
string $ent:
array $settings:
Return value
array $settings
2 calls to WebformCivicrmBase::add_user_select_field_placeholder()
- WebformCivicrmBase::matchLocationTypes in src/
WebformCivicrmBase.php  - Organize values according to location types
 - WebformCivicrmBase::matchWebsiteTypes in src/
WebformCivicrmBase.php  - Organize values according to website types
 
File
- src/
WebformCivicrmBase.php, line 476  - Front-end form handler base class.
 
Class
- WebformCivicrmBase
 - Class WebformCivicrmBase
 
Namespace
Drupal\webform_civicrmCode
protected function add_user_select_field_placeholder($ent, $settings = []) {
  if ($settings['number_of_' . $ent] > count($settings[$ent])) {
    for ($i = 1; $i <= $settings['number_of_' . $ent]; $i++) {
      if (!array_key_exists($i, $settings[$ent])) {
        $settings[$ent][$i]['location_type_id'] = NULL;
      }
    }
    ksort($settings[$ent]);
  }
  return $settings;
}