YAMLFORM Element Settings I'm using yamlform in my Drupal 8 site and I want to add a new setting (i.e General Settings, Form Display etc) to each of my fields based on if I have a handler attached to my form. 

I have used the  

function prepare() 


method for this in my custom elements, but I would like to add it to all existing elements as well, there are several hooks available but I'm not sure which one would be most appropriate.

I realise that yamlform gives you a custom settings box, but I need something a bit more obvious for my non-tech end users.

Thanks.
So In the end I had to use hook_form_alter, here's a quick trimmed down example of how I achieved my particular problem: 

function hook_form_alter(&amp;$form, FormStateInterface $form_state, $form_id) {

if ($form_state-&gt;getFormObject() instanceof YamlFormUiElementEditForm and hashandler) {

$form['newsection'] = [
  '#type' =&gt; 'fieldset',
  '#title' =&gt; t('New Section'),
];
$form['newsection']['newfield'] = [
  '#type' =&gt; 'textfield',
  '#title' =&gt; t('New field'),
];