function custom_add_another_third_party_settings_submit in Custom add another 8
Submit callback that saves custom labels to field Third Party Settings.
1 string reference to 'custom_add_another_third_party_settings_submit'
File
- ./
custom_add_another.module, line 83 - Allows the 'Add another item' button text to be customised.
Code
function custom_add_another_third_party_settings_submit($form, FormStateInterface $form_state) {
/** @var \Drupal\field\FieldConfigInterface $field */
$field = $form_state
->getStorage()['field_config'];
$field
->setThirdPartySetting('custom_add_another', 'custom_add_another', $form_state
->getValue('custom_add_another'))
->setThirdPartySetting('custom_add_another', 'custom_remove', $form_state
->getValue('custom_remove'))
->save();
}