How do I extend a configuration form without using hook_form_alter()? I want to extend some fields in a config form of a module with another module in Drupal 8. I created a config form in a module (e.g. custom_1) and now I want to add some more fields from another module (e.g. custom_2). custom_1 has a dependency on custom_2. I tried hook_form_alter() but it didn't resolve the issue.

Is there any other way to achieve this in Drupal 8?
Solution:

I came out to this solution: 

I created a custom_1.routing.yml file and write the following code in it. 

#Router settings for custom service page
custom_form.service_config:
path: '/admin/config/services/custom'
defaults:
  _form: '\Drupal\custom_1\Form\CustomConfigForm'
  _title: 'Custom Config Form'
  _description: 'Custom Configuration form.'
requirements:
  _permission: 'administer custom'


I created a CustomConfigForm.php file in custom_1/src/Form/CustomConfigForm.php. 

    namespace Drupal\custom_1\Form;

    use Drupal\Core\Form\ConfigFormBase;
    use Drupal\Core\Form\FormStateInterface;

    class CustomConfigForm extends ConfigFormBase {
      public funtion getFormId() {
          return 'custom_form_service_config_form'; 
      }
      public function getEditableConfigNames() {
          return ['custom_form.service_config'];  
      }
      public function buildForm(array $form, FormStateInterface $form_state) {
          // Form code here
         return buildform($form, $form_state);
      }
      public function submitForm(array &amp;$form, FormStateInterface $form_state) {
         // Submit code here
      }
    }


Now, I have to merge some more form fields from another module custom_2. To achieve this, I followed the following steps.
I created a custom_2.routing.yml file and write the following code in it. 

#Router settings for custom service page
custom_form.service_config:
path: '/admin/config/services/custom'
defaults:
  _form: '\Drupal\custom_2\Form\CustomTwoConfigForm'
  _title: 'Custom Config Form'
  _description: 'Custom Configuration form.'
requirements:
  _permission: 'administer custom'


I created a CustomTwoConfigForm.php file in custom_2/src/Form/CustomTwoConfigForm.php.

    namespace Drupal\custom_2\Form;

    use Drupal\Core\Form\FormStateInterface;
    use Drupal\custom_1\Form\CustomConfigForm;

    class CustomTwoConfigForm extends CustomConfigForm  {
      public funtion getFormId(){
          return 'custom_form_service_config_form'; 
      }
      public function getEditableConfigNames(){
          return ['custom_form.service_config'];  
      }
      public function buildForm(array $form, FormStateInterface $form_state) {
           $form = parent::buildform($form, $form_state);
          // Form code here
         return parent::buildform($form, $form_state);
      }
      public function submitForm(array &amp;$form, FormStateInterface $form_state) {
         // Submit code here
      }
    }


This resolve the issue for me without using hook_form_alter(). 

Thanks