How to use $config->get for #default_value when multidimensional I am creating a form and I want to store the form values every time the form is saved, so I am using: 

'#default_value' =&gt; $config-&gt;get('field_name')


However what would I do if my form item rather than being

$form['field_name'] = [
  '#type' =&gt; 'datetime',
  '#default_value' =&gt; $config-&gt;get('field_name'),
  '#date_date_element' =&gt; 'none', 
  '#date_time_element' =&gt; 'time',
  '#date_time_format' =&gt; 'H:i',
];


was this

$form['section']['field_name'] = [
  '#type' =&gt; 'datetime',
  '#default_value' =&gt; $config-&gt;get('field_name'),
  '#date_date_element' =&gt; 'none', 
  '#date_time_element' =&gt; 'time', 
  '#date_time_format' =&gt; 'H:i',
];


I have tried unsuccessfully 

'#default_value' =&gt; $config-&gt;get('section.field_name')
I have tried unsuccessfully 

'#default_value' =&gt; $config-&gt;get('section.field_name')



Probably because you didn't set it first with section.field_name otherwise you can't retrieve it if you have not set it with that name. 



Field names are supposed to be unique, so nothing different.

It really depends on what you do in set, you could give it whatever name you like 

$config-&gt;set('lalalala', $form_state-&gt;getValue('field_name')); 

and then retrive it with $config-&gt;get('lalalala'),

but convention is to give it the field name:

$config-&gt;set('field_name', $form_state-&gt;getValue('field_name'));