VITSUSA said ...
This is good advice to recommend to place the JS in your index.php.
code to hide and show the form, no need to "Fetch" the form.
if you have a good reason to fetch the form then, probably,
in the index.php.
here is an HTML page, no PHP needed, that fetches a form element
along with a style element And a script element