I'm coding my first module now. I've just managed to add a button to the page edit form but am not content with its placing. Is there any way to place it just next to the input field? I've marked the desired place with the arrow on the attached screenshot.
My current code:
$this->addHookAfter('ProcessPageEdit::buildFormContent' , $this, 'addButton');
public function addButton($event){
$form = $event->return;
$f =$this->modules->InputfieldSubmit;
...
$form->insertAfter($f, $form->get("bgg_id"));
}
"bgg_id" is the name of the targeted field.