function multiple_registration_field_config_form_submit in Multiple Registration 8
Same name and namespace in other branches
- 8.2 multiple_registration.module \multiple_registration_field_config_form_submit()
- 3.x multiple_registration.module \multiple_registration_field_config_form_submit()
Form submit to save additional field settings.
Parameters
array $form: Form data array.
\Drupal\Core\Form\FormStateInterface $form_state: Form state object.
1 string reference to 'multiple_registration_field_config_form_submit'
File
- ./
multiple_registration.module, line 160 - Contains multiple_registration.module.
Code
function multiple_registration_field_config_form_submit(array &$form, FormStateInterface $form_state) {
$data = $form_state
->getValue('multiple_registration');
$data_required = $form_state
->getValue('multiple_registration_required');
$field = $form_state
->getFormObject()
->getEntity();
$field
->setThirdPartySetting('multiple_registration', 'user_additional_register_form', $data);
$field
->setThirdPartySetting('multiple_registration', 'user_additional_register_form_required', $data_required);
$field
->save();
}