Alter view plugin form in custom module files I'm looking for the right method to modify an especific plugin views ui inside a custom module. The views plugin to alter is created by the module https://www.drupal.org/project/views_json_source
I want to hide the &quot;json file&quot; field, in the query options. And when the view is executed i want prefill this field with config data from my custom module.
Later i will need to create my custom exposed form using the json fields, but this is another story.
I think the right way is using the hook_views_plugin_option_definition_alter, but i've tested it in my module and it dont make nothing (drupal messages are not displayed).
The views json source have an plugin/views/query/ViewsJsonQuery with this code:
public function buildOptionsForm(&amp;$form, FormStateInterface $form_state) {

  $form['json_file'] = [
    '#type' =&gt; 'textfield',
    '#title' =&gt; $this-&gt;t('JSON File'),
    '#default_value' =&gt; $this-&gt;options['json_file'],
    '#description' =&gt; $this-&gt;t(&quot;The URL or path to the JSON file.&quot;),
    '#maxlength' =&gt; 1024,
  ];

}

Somebody can help to the right way?
Thanks in advance.
PD.: I'm using Drupal 9.
Finally i've created an customized views_json_source module adapted to my requirement. Anyway, it would be interesting if somebody can ask the question.