Additional field settings without creating a new field type I'm trying to add 2 options to the field settings of all fields of a particular field type, in this case file field. To add the fields to the form I'm using MYMODULE_form_field_config_edit_form_alter() instead of extending the base class so it will work with other modules and I won't need to use a custom field type.
Using ThirdPartySettings to store the data doesn't add it to the base config for the field therefore the settings won't be automatically available to other modules.
e.g.
function MYMODULE_form_field_config_edit_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {

  $field = $form_state-&gt;getFormObject()-&gt;getEntity();
  if ($field-&gt;getType() == 'file') {

    $settings = $field-&gt;getSettings();

    $form['my_checkbox'] = [
      '#type' =&gt; 'checkbox',
      '#title' =&gt; t('My Checkbox'),
      '#default_value' =&gt; isset($settings['my_checkbox']) ? $settings['my_checkbox'] : '',
      '#description' =&gt; t('Check to check my checkbox.'),
    ];

    $form['#entity_builders'][] = 'MYMODULE_form_builder';
  }
}

function MYMODULE_form_builder($entity_type, FieldConfig $field, &amp;$form, FormStateInterface $form_state) {
   // What goes here? I can't do $field-&gt;set() on properties which don't exists.
}

I've tried setting up a schema file as src/config/scheme/mymodule.schema.yml but I'm not sure how to extend the relevant settings in core/modules/file/config/schema/file/schema.yml.
base_file_field_field_settings seems to have the relevant entries I'm wanting to add to. Do I need to add a class or an install yml file?
This works for me:

$field-&gt;setThirdPartySetting('mymodule', 'my_checkbox', $form_state-&gt;getValue('my_checkbox'));


After you save your field settings, the new third party setting should be available in your field config:

third_party_settings:
  mymodule:
    my_checkbox: 1


Here is a good article about this: https://www.webomelette.com/drupal-8-custom-data-configuration-entities-using-thirdpartysettingsinterface