where is the problem? It does exactly that by default IIRC:
$form->setElement( 'mediaselection', 'myMediaSelection', array( 'label' => 'Media', 'value' => null ) );
Read the path:
If this is not what you’ve been loking for, please explain, what is expected and what happens instead and what you did so far. Not always is a picture worth 1000 words
I am creating a plugin that has a configuration form as you can see in the picture.
In that form I have a media selection field and I will select an image in that field.
Now when I click Save button in configuration form, I want to store the image path of media selection field in my database.
I want to know how can I trigger ‚save configuration‘ button in my bootstrap file and pass the form fields into it?