I can confirm this issue when placing the ajax callback within the same class that provides the options form
however a simple fix would be placing the ajax callback on your .module file
something like this
/**
* {@inheritdoc}
*/
public function buildOptionsForm(&$form, FormStateInterface $form_state) {
parent::buildOptionsForm($original_form, $form_state);
$form['test']=[
"#type" => "select",
'#default_value' => "test",
"#title" => t("Component"),
"#options" => ['test'=>'test','test2'],
'#ajax' => [
'callback' => '_your_module_ajax_callback',
'wrapper' => 'test',
'effect' => 'fade',
'#suffix' => '<div id="test"></div>'
],
'#executes_submit_callback' => FALSE,
'#required' => TRUE,
];
}
and in your .module file
function _your_module_ajax_callback($form,FormStateInterface $form_state ) {
return ['#markup'=>'hello'];
}
what remains
add override configuration on module install
alter the settings form to add some descriptions
Done
This is complete
Done , visualizations was done in a table , not symfony var dumper
This is done , with child issues
ahmed eldesoky → changed the visibility of the branch 3495619-settings-form to active.
ahmed eldesoky → changed the visibility of the branch 3495619-settings-form to hidden.
ahmed eldesoky → created an issue.
ahmed eldesoky → created an issue.
ahmed eldesoky → created an issue.
ahmed eldesoky → created an issue.
ahmed eldesoky → created an issue.
ahmed eldesoky → created an issue.
The previous patch had some missing files, fixed in this version
#15 causes JS issues with Drupal 10 , because jquery.once is removed
this is Drupal 10 JS compatible version of #15